Index: trip-planner-front/node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
@@ -4232,4 +4232,5 @@
                 }
             }), finalize(() => {
+                var _a;
                 /* When the navigation stream finishes either through error or success, we
                  * set the `completed` or `errored` flag. However, there are some situations
@@ -4264,8 +4265,9 @@
                     }
                 }
-                // currentNavigation should always be reset to null here. If navigation was
-                // successful, lastSuccessfulTransition will have already been set. Therefore
-                // we can safely set currentNavigation to null here.
-                this.currentNavigation = null;
+                // Only clear current navigation if it is still set to the one that
+                // finalized.
+                if (((_a = this.currentNavigation) === null || _a === void 0 ? void 0 : _a.id) === t.id) {
+                    this.currentNavigation = null;
+                }
             }), catchError((e) => {
                 // TODO(atscott): The NavigationTransition `t` used here does not accurately
@@ -6228,5 +6230,5 @@
  * @publicApi
  */
-const VERSION = new Version('12.2.9');
+const VERSION = new Version('12.2.13');
 
 /**
Index: trip-planner-front/node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js.map
===================================================================
--- trip-planner-front/node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js.map	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js.map	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,1 +1,1 @@
-{"version":3,"file":"router.js","sources":["../../../../../../packages/router/src/events.ts","../../../../../../packages/router/src/shared.ts","../../../../../../packages/router/src/utils/collection.ts","../../../../../../packages/router/src/url_tree.ts","../../../../../../packages/router/src/utils/tree.ts","../../../../../../packages/router/src/router_state.ts","../../../../../../packages/router/src/create_router_state.ts","../../../../../../packages/router/src/create_url_tree.ts","../../../../../../packages/router/src/operators/activate_routes.ts","../../../../../../packages/router/src/config.ts","../../../../../../packages/router/src/utils/type_guards.ts","../../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../../packages/router/src/components/empty_outlet.ts","../../../../../../packages/router/src/utils/config.ts","../../../../../../packages/router/src/utils/config_matching.ts","../../../../../../packages/router/src/apply_redirects.ts","../../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../../packages/router/src/utils/preactivation.ts","../../../../../../packages/router/src/operators/check_guards.ts","../../../../../../packages/router/src/recognize.ts","../../../../../../packages/router/src/operators/recognize.ts","../../../../../../packages/router/src/operators/resolve_data.ts","../../../../../../packages/router/src/operators/switch_tap.ts","../../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../../packages/router/src/router_config_loader.ts","../../../../../../packages/router/src/router_outlet_context.ts","../../../../../../packages/router/src/url_handling_strategy.ts","../../../../../../packages/router/src/router.ts","../../../../../../packages/router/src/directives/router_link.ts","../../../../../../packages/router/src/directives/router_link_active.ts","../../../../../../packages/router/src/directives/router_outlet.ts","../../../../../../packages/router/src/router_preloader.ts","../../../../../../packages/router/src/router_scroller.ts","../../../../../../packages/router/src/router_module.ts","../../../../../../packages/router/src/version.ts","../../../../../../packages/router/src/private_export.ts","../../../../../../packages/router/src/index.ts","../../../../../../packages/router/public_api.ts","../../../../../../packages/router/index.ts","../../../../../../packages/router/router.ts"],"names":["isObservable","isPromise","EmptyOutletComponent","noMatch","last","applyRedirects","applyRedirectsFn","NoMatch","recognize","recognizeFn","Console"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAa,WAAW;AACx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C/B,SAAK;AACL,QAAI,EAAC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,iBAAiB,CAAC,EAAC;AAC9F,QAAI,EAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAC;AACnF,KAAG,CAAC;AACJ;AACA;AClmBA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA,MAAa,OAAO,GAAG,IAAI,OAAO,CAAC;AACnC;AAAC;AAAI,GADiD,HClBtD;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AAK44B","sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * Identifies the call or event that triggered a navigation.\n *\n * * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.\n * * 'popstate' : Triggered by a `popstate` event.\n * * 'hashchange'-: Triggered by a `hashchange` event.\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative'|'popstate'|'hashchange';\n\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n *   constructor(public router: Router) {\n *     router.events.pipe(\n *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n *     ).subscribe((e: RouterEvent) => {\n *       // Do something\n *     });\n *   }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router-reference#router-events)\n * @publicApi\n */\nexport class RouterEvent {\n  constructor(\n      /** A unique ID that the router assigns to every router navigation. */\n      public id: number,\n      /** The URL that is the destination for this navigation. */\n      public url: string) {}\n}\n\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n  /**\n   * Identifies the call or event that triggered the navigation.\n   * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n   *\n   * @see `NavigationEnd`\n   * @see `NavigationCancel`\n   * @see `NavigationError`\n   */\n  navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n  /**\n   * The navigation state that was previously supplied to the `pushState` call,\n   * when the navigation is triggered by a `popstate` event. Otherwise null.\n   *\n   * The state object is defined by `NavigationExtras`, and contains any\n   * developer-defined state value, as well as a unique ID that\n   * the router assigns to every router transition/navigation.\n   *\n   * From the perspective of the router, the router never \"goes back\".\n   * When the user clicks on the back button in the browser,\n   * a new navigation ID is created.\n   *\n   * Use the ID in this previous-state object to differentiate between a newly created\n   * state and one returned to by a `popstate` event, so that you can restore some\n   * remembered state, such as scroll position.\n   *\n   */\n  restoredState?: {[k: string]: any, navigationId: number}|null;\n\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n      /** @docsNotRequired */\n      restoredState: {[k: string]: any, navigationId: number}|null = null) {\n    super(id, url);\n    this.navigationTrigger = navigationTrigger;\n    this.restoredState = restoredState;\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public reason: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationCancel`\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public error: any) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n  }\n}\n\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot,\n      /** @docsNotRequired */\n      public shouldActivate: boolean) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see `ResolveEnd`\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadStart(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadEnd(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see  `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart`\n * @publicApi\n */\nexport class ChildActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nexport class Scroll {\n  constructor(\n      /** @docsNotRequired */\n      readonly routerEvent: NavigationEnd,\n\n      /** @docsNotRequired */\n      readonly position: [number, number]|null,\n\n      /** @docsNotRequired */\n      readonly anchor: string|null) {}\n\n  toString(): string {\n    const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n    return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n  }\n}\n\n/**\n * Router events that allow you to track the lifecycle of the router.\n *\n * The events occur in the following sequence:\n *\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\n * the router [lazy loads](/guide/router#lazy-loading) a route configuration.\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\n * and the routes are recognized.\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\n * phase of routing.\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\n * begins activating a route's children.\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\n * phase of routing successfully.\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\n * phase of routing.\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\n * phase of routing successfully.\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\n * activating a route's children.\n * * [ActivationEnd](api/router/ActivationEnd): When the router finishes activating a route.\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\n * * [NavigationError](api/router/NavigationError): When navigation fails\n * due to an unexpected error.\n * * [Scroll](api/router/Scroll): When the user scrolls.\n *\n * @publicApi\n */\nexport type Event = RouterEvent|RouteConfigLoadStart|RouteConfigLoadEnd|ChildActivationStart|\n    ChildActivationEnd|ActivationStart|ActivationEnd|Scroll;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of matrix and query URL parameters.\n * @see `convertToParamMap()`\n * @see `ParamMap`\n *\n * @publicApi\n */\nexport type Params = {\n  [key: string]: any;\n};\n\n/**\n * A map that provides access to the required and optional parameters\n * specific to a route.\n * The map supports retrieving a single value with `get()`\n * or multiple values with `getAll()`.\n *\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n *\n * @publicApi\n */\nexport interface ParamMap {\n  /**\n   * Reports whether the map contains a given parameter.\n   * @param name The parameter name.\n   * @returns True if the map contains the given parameter, false otherwise.\n   */\n  has(name: string): boolean;\n  /**\n   * Retrieves a single value for a parameter.\n   * @param name The parameter name.\n   * @return The parameter's single value,\n   * or the first value if the parameter has multiple values,\n   * or `null` when there is no such parameter.\n   */\n  get(name: string): string|null;\n  /**\n   * Retrieves multiple values for a parameter.\n   * @param name The parameter name.\n   * @return An array containing one or more values,\n   * or an empty array if there is no such parameter.\n   *\n   */\n  getAll(name: string): string[];\n\n  /** Names of the parameters in the map. */\n  readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n  private params: Params;\n\n  constructor(params: Params) {\n    this.params = params || {};\n  }\n\n  has(name: string): boolean {\n    return Object.prototype.hasOwnProperty.call(this.params, name);\n  }\n\n  get(name: string): string|null {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v[0] : v;\n    }\n\n    return null;\n  }\n\n  getAll(name: string): string[] {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v : [v];\n    }\n\n    return [];\n  }\n\n  get keys(): string[] {\n    return Object.keys(this.params);\n  }\n}\n\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n  return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n  const error = Error('NavigationCancelingError: ' + message);\n  (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n  return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n  return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n    segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n  const parts = route.path!.split('/');\n\n  if (parts.length > segments.length) {\n    // The actual URL is shorter than the config, no match\n    return null;\n  }\n\n  if (route.pathMatch === 'full' &&\n      (segmentGroup.hasChildren() || parts.length < segments.length)) {\n    // The config is longer than the actual URL but we are looking for a full match, return null\n    return null;\n  }\n\n  const posParams: {[key: string]: UrlSegment} = {};\n\n  // Check each config part against the actual URL\n  for (let index = 0; index < parts.length; index++) {\n    const part = parts[index];\n    const segment = segments[index];\n    const isParameter = part.startsWith(':');\n    if (isParameter) {\n      posParams[part.substring(1)] = segment;\n    } else if (part !== segment.path) {\n      // The actual URL part does not match the config, no match\n      return null;\n    }\n  }\n\n  return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {from, Observable, of} from 'rxjs';\n\nimport {Params} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; ++i) {\n    if (!shallowEqual(a[i], b[i])) return false;\n  }\n  return true;\n}\n\nexport function shallowEqual(a: Params, b: Params): boolean {\n  // While `undefined` should never be possible, it would sometimes be the case in IE 11\n  // and pre-chromium Edge. The check below accounts for this edge case.\n  const k1 = a ? Object.keys(a) : undefined;\n  const k2 = b ? Object.keys(b) : undefined;\n  if (!k1 || !k2 || k1.length != k2.length) {\n    return false;\n  }\n  let key: string;\n  for (let i = 0; i < k1.length; i++) {\n    key = k1[i];\n    if (!equalArraysOrString(a[key], b[key])) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Test equality for arrays of strings or a string.\n */\nexport function equalArraysOrString(a: string|string[], b: string|string[]) {\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    const aSorted = [...a].sort();\n    const bSorted = [...b].sort();\n    return aSorted.every((val, index) => bSorted[index] === val);\n  } else {\n    return a === b;\n  }\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n  return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n  return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n  return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n  for (const prop in map) {\n    if (map.hasOwnProperty(prop)) {\n      callback(map[prop], prop);\n    }\n  }\n}\n\nexport function wrapIntoObservable<T>(value: T|Promise<T>|Observable<T>): Observable<T> {\n  if (isObservable(value)) {\n    return value;\n  }\n\n  if (isPromise(value)) {\n    // Use `Promise.resolve()` to wrap promise-like instances.\n    // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n    // change detection.\n    return from(Promise.resolve(value));\n  }\n\n  return of(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalArraysOrString, forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n  return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\n/**\n * A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`\n * for the current router state.\n *\n * @publicApi\n * @see Router.isActive\n */\nexport interface IsActiveMatchOptions {\n  /**\n   * Defines the strategy for comparing the matrix parameters of two `UrlTree`s.\n   *\n   * The matrix parameter matching is dependent on the strategy for matching the\n   * segments. That is, if the `paths` option is set to `'subset'`, only\n   * the matrix parameters of the matching segments will be compared.\n   *\n   * - `'exact'`: Requires that matching segments also have exact matrix parameter\n   * matches.\n   * - `'subset'`: The matching segments in the router's active `UrlTree` may contain\n   * extra matrix parameters, but those that exist in the `UrlTree` in question must match.\n   * - `'ignored'`: When comparing `UrlTree`s, matrix params will be ignored.\n   */\n  matrixParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the query parameters of two `UrlTree`s.\n   *\n   * - `'exact'`: the query parameters must match exactly.\n   * - `'subset'`: the active `UrlTree` may contain extra parameters,\n   * but must match the key and value of any that exist in the `UrlTree` in question.\n   * - `'ignored'`: When comparing `UrlTree`s, query params will be ignored.\n   */\n  queryParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the `UrlSegment`s of the `UrlTree`s.\n   *\n   * - `'exact'`: all segments in each `UrlTree` must match.\n   * - `'subset'`: a `UrlTree` will be determined to be active if it\n   * is a subtree of the active route. That is, the active route may contain extra\n   * segments, but must at least have all the segements of the `UrlTree` in question.\n   */\n  paths: 'exact'|'subset';\n  /**\n   * - 'exact'`: indicates that the `UrlTree` fragments must be equal.\n   * - `'ignored'`: the fragments will not be compared when determining if a\n   * `UrlTree` is active.\n   */\n  fragment: 'exact'|'ignored';\n}\n\ntype ParamMatchOptions = 'exact'|'subset'|'ignored';\n\ntype PathCompareFn =\n    (container: UrlSegmentGroup, containee: UrlSegmentGroup, matrixParams: ParamMatchOptions) =>\n        boolean;\ntype ParamCompareFn = (container: Params, containee: Params) => boolean;\n\nconst pathCompareMap: Record<IsActiveMatchOptions['paths'], PathCompareFn> = {\n  'exact': equalSegmentGroups,\n  'subset': containsSegmentGroup,\n};\nconst paramCompareMap: Record<ParamMatchOptions, ParamCompareFn> = {\n  'exact': equalParams,\n  'subset': containsParams,\n  'ignored': () => true,\n};\n\nexport function containsTree(\n    container: UrlTree, containee: UrlTree, options: IsActiveMatchOptions): boolean {\n  return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) &&\n      paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) &&\n      !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\n\nfunction equalParams(container: Params, containee: Params): boolean {\n  // TODO: This does not handle array params correctly.\n  return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  if (!equalPath(container.segments, containee.segments)) return false;\n  if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n    return false;\n  }\n  if (container.numberOfChildren !== containee.numberOfChildren) return false;\n  for (const c in containee.children) {\n    if (!container.children[c]) return false;\n    if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n      return false;\n  }\n  return true;\n}\n\nfunction containsParams(container: Params, containee: Params): boolean {\n  return Object.keys(containee).length <= Object.keys(container).length &&\n      Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\n\nfunction containsSegmentGroup(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\n\nfunction containsSegmentGroupHelper(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[],\n    matrixParams: ParamMatchOptions): boolean {\n  if (container.segments.length > containeePaths.length) {\n    const current = container.segments.slice(0, containeePaths.length);\n    if (!equalPath(current, containeePaths)) return false;\n    if (containee.hasChildren()) return false;\n    if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n    return true;\n\n  } else if (container.segments.length === containeePaths.length) {\n    if (!equalPath(container.segments, containeePaths)) return false;\n    if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n    for (const c in containee.children) {\n      if (!container.children[c]) return false;\n      if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n        return false;\n      }\n    }\n    return true;\n\n  } else {\n    const current = containeePaths.slice(0, container.segments.length);\n    const next = containeePaths.slice(container.segments.length);\n    if (!equalPath(container.segments, current)) return false;\n    if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n    if (!container.children[PRIMARY_OUTLET]) return false;\n    return containsSegmentGroupHelper(\n        container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n  }\n}\n\nfunction matrixParamsMatch(\n    containerPaths: UrlSegment[], containeePaths: UrlSegment[], options: ParamMatchOptions) {\n  return containeePaths.every((containeeSegment, i) => {\n    return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n  });\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree =\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n *     const f = tree.fragment; // return 'fragment'\n *     const q = tree.queryParams; // returns {debug: 'true'}\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n *     g.children['support'].segments; // return 1 segment 'help'\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The root segment group of the URL tree */\n      public root: UrlSegmentGroup,\n      /** The query params of the URL */\n      public queryParams: Params,\n      /** The fragment of the URL */\n      public fragment: string|null) {}\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return DEFAULT_SERIALIZER.serialize(this);\n  }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n  /** @internal */\n  _sourceSegment?: UrlSegmentGroup;\n  /** @internal */\n  _segmentIndexShift?: number;\n  /** The parent node in the url tree */\n  parent: UrlSegmentGroup|null = null;\n\n  constructor(\n      /** The URL segments of this group. See `UrlSegment` for more information */\n      public segments: UrlSegment[],\n      /** The list of children of this group */\n      public children: {[key: string]: UrlSegmentGroup}) {\n    forEach(children, (v: any, k: any) => v.parent = this);\n  }\n\n  /** Whether the segment has child segments */\n  hasChildren(): boolean {\n    return this.numberOfChildren > 0;\n  }\n\n  /** Number of child segments */\n  get numberOfChildren(): number {\n    return Object.keys(this.children).length;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePaths(this);\n  }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments;\n *     s[0].path; // returns 'team'\n *     s[0].parameters; // returns {id: 33}\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _parameterMap!: ParamMap;\n\n  constructor(\n      /** The path part of a URL segment */\n      public path: string,\n\n      /** The matrix parameters associated with a segment */\n      public parameters: {[name: string]: string}) {}\n\n  get parameterMap() {\n    if (!this._parameterMap) {\n      this._parameterMap = convertToParamMap(this.parameters);\n    }\n    return this._parameterMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePath(this);\n  }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  if (as.length !== bs.length) return false;\n  return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n    segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n  let res: T[] = [];\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet === PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet !== PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n  /** Parse a url into a `UrlTree` */\n  abstract parse(url: string): UrlTree;\n\n  /** Converts a `UrlTree` into a url */\n  abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n  /** Parses a url into a `UrlTree` */\n  parse(url: string): UrlTree {\n    const p = new UrlParser(url);\n    return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n  }\n\n  /** Converts a `UrlTree` into a url */\n  serialize(tree: UrlTree): string {\n    const segment = `/${serializeSegment(tree.root, true)}`;\n    const query = serializeQueryParams(tree.queryParams);\n    const fragment =\n        typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n\n    return `${segment}${query}${fragment}`;\n  }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n  return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n  if (!segment.hasChildren()) {\n    return serializePaths(segment);\n  }\n\n  if (root) {\n    const primary = segment.children[PRIMARY_OUTLET] ?\n        serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n        '';\n    const children: string[] = [];\n\n    forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n      if (k !== PRIMARY_OUTLET) {\n        children.push(`${k}:${serializeSegment(v, false)}`);\n      }\n    });\n\n    return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n  } else {\n    const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n      if (k === PRIMARY_OUTLET) {\n        return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n      }\n\n      return [`${k}:${serializeSegment(v, false)}`];\n    });\n\n    // use no parenthesis if the only child is a primary outlet route\n    if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n      return `${serializePaths(segment)}/${children[0]}`;\n    }\n\n    return `${serializePaths(segment)}/(${children.join('//')})`;\n  }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n  return encodeURIComponent(s)\n      .replace(/%40/g, '@')\n      .replace(/%3A/gi, ':')\n      .replace(/%24/g, '$')\n      .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n  return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n  return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n  return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n  return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n  return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n  return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n  return Object.keys(params)\n      .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n      .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n  const strParams: string[] =\n      Object.keys(params)\n          .map((name) => {\n            const value = params[name];\n            return Array.isArray(value) ?\n                value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n                `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n          })\n          .filter(s => !!s);\n\n  return strParams.length ? `?${strParams.join('&')}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n  const match = str.match(SEGMENT_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n  const match = str.match(QUERY_PARAM_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n  const match = str.match(QUERY_PARAM_VALUE_RE);\n  return match ? match[0] : '';\n}\n\nclass UrlParser {\n  private remaining: string;\n\n  constructor(private url: string) {\n    this.remaining = url;\n  }\n\n  parseRootSegment(): UrlSegmentGroup {\n    this.consumeOptional('/');\n\n    if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n      return new UrlSegmentGroup([], {});\n    }\n\n    // The root segment group never has segments\n    return new UrlSegmentGroup([], this.parseChildren());\n  }\n\n  parseQueryParams(): Params {\n    const params: Params = {};\n    if (this.consumeOptional('?')) {\n      do {\n        this.parseQueryParam(params);\n      } while (this.consumeOptional('&'));\n    }\n    return params;\n  }\n\n  parseFragment(): string|null {\n    return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n  }\n\n  private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n    if (this.remaining === '') {\n      return {};\n    }\n\n    this.consumeOptional('/');\n\n    const segments: UrlSegment[] = [];\n    if (!this.peekStartsWith('(')) {\n      segments.push(this.parseSegment());\n    }\n\n    while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n      this.capture('/');\n      segments.push(this.parseSegment());\n    }\n\n    let children: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('/(')) {\n      this.capture('/');\n      children = this.parseParens(true);\n    }\n\n    let res: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('(')) {\n      res = this.parseParens(false);\n    }\n\n    if (segments.length > 0 || Object.keys(children).length > 0) {\n      res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n    }\n\n    return res;\n  }\n\n  // parse a segment with its matrix parameters\n  // ie `name;k1=v1;k2`\n  private parseSegment(): UrlSegment {\n    const path = matchSegments(this.remaining);\n    if (path === '' && this.peekStartsWith(';')) {\n      throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n    }\n\n    this.capture(path);\n    return new UrlSegment(decode(path), this.parseMatrixParams());\n  }\n\n  private parseMatrixParams(): {[key: string]: string} {\n    const params: {[key: string]: string} = {};\n    while (this.consumeOptional(';')) {\n      this.parseParam(params);\n    }\n    return params;\n  }\n\n  private parseParam(params: {[key: string]: string}): void {\n    const key = matchSegments(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchSegments(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    params[decode(key)] = decode(value);\n  }\n\n  // Parse a single query parameter `name[=value]`\n  private parseQueryParam(params: Params): void {\n    const key = matchQueryParams(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchUrlQueryParamValue(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    const decodedKey = decodeQuery(key);\n    const decodedVal = decodeQuery(value);\n\n    if (params.hasOwnProperty(decodedKey)) {\n      // Append to existing values\n      let currentVal = params[decodedKey];\n      if (!Array.isArray(currentVal)) {\n        currentVal = [currentVal];\n        params[decodedKey] = currentVal;\n      }\n      currentVal.push(decodedVal);\n    } else {\n      // Create a new value\n      params[decodedKey] = decodedVal;\n    }\n  }\n\n  // parse `(a/b//outlet_name:c/d)`\n  private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n    const segments: {[key: string]: UrlSegmentGroup} = {};\n    this.capture('(');\n\n    while (!this.consumeOptional(')') && this.remaining.length > 0) {\n      const path = matchSegments(this.remaining);\n\n      const next = this.remaining[path.length];\n\n      // if is is not one of these characters, then the segment was unescaped\n      // or the group was not closed\n      if (next !== '/' && next !== ')' && next !== ';') {\n        throw new Error(`Cannot parse url '${this.url}'`);\n      }\n\n      let outletName: string = undefined!;\n      if (path.indexOf(':') > -1) {\n        outletName = path.substr(0, path.indexOf(':'));\n        this.capture(outletName);\n        this.capture(':');\n      } else if (allowPrimary) {\n        outletName = PRIMARY_OUTLET;\n      }\n\n      const children = this.parseChildren();\n      segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n                                                                  new UrlSegmentGroup([], children);\n      this.consumeOptional('//');\n    }\n\n    return segments;\n  }\n\n  private peekStartsWith(str: string): boolean {\n    return this.remaining.startsWith(str);\n  }\n\n  // Consumes the prefix when it is present and returns whether it has been consumed\n  private consumeOptional(str: string): boolean {\n    if (this.peekStartsWith(str)) {\n      this.remaining = this.remaining.substring(str.length);\n      return true;\n    }\n    return false;\n  }\n\n  private capture(str: string): void {\n    if (!this.consumeOptional(str)) {\n      throw new Error(`Expected \"${str}\".`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n  /** @internal */\n  _root: TreeNode<T>;\n\n  constructor(root: TreeNode<T>) {\n    this._root = root;\n  }\n\n  get root(): T {\n    return this._root.value;\n  }\n\n  /**\n   * @internal\n   */\n  parent(t: T): T|null {\n    const p = this.pathFromRoot(t);\n    return p.length > 1 ? p[p.length - 2] : null;\n  }\n\n  /**\n   * @internal\n   */\n  children(t: T): T[] {\n    const n = findNode(t, this._root);\n    return n ? n.children.map(t => t.value) : [];\n  }\n\n  /**\n   * @internal\n   */\n  firstChild(t: T): T|null {\n    const n = findNode(t, this._root);\n    return n && n.children.length > 0 ? n.children[0].value : null;\n  }\n\n  /**\n   * @internal\n   */\n  siblings(t: T): T[] {\n    const p = findPath(t, this._root);\n    if (p.length < 2) return [];\n\n    const c = p[p.length - 2].children.map(c => c.value);\n    return c.filter(cc => cc !== t);\n  }\n\n  /**\n   * @internal\n   */\n  pathFromRoot(t: T): T[] {\n    return findPath(t, this._root).map(s => s.value);\n  }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n  if (value === node.value) return node;\n\n  for (const child of node.children) {\n    const node = findNode(value, child);\n    if (node) return node;\n  }\n\n  return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n  if (value === node.value) return [node];\n\n  for (const child of node.children) {\n    const path = findPath(value, child);\n    if (path.length) {\n      path.unshift(node);\n      return path;\n    }\n  }\n\n  return [];\n}\n\nexport class TreeNode<T> {\n  constructor(public value: T, public children: TreeNode<T>[]) {}\n\n  toString(): string {\n    return `TreeNode(${this.value})`;\n  }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends {outlet: string}>(node: TreeNode<T>|null) {\n  const map: {[outlet: string]: TreeNode<T>} = {};\n\n  if (node) {\n    node.children.forEach(child => map[child.value.outlet] = child);\n  }\n\n  return map;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalSegments, UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const root: ActivatedRoute = state.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n  /** @internal */\n  constructor(\n      root: TreeNode<ActivatedRoute>,\n      /** The current snapshot of the router state */\n      public snapshot: RouterStateSnapshot) {\n    super(root);\n    setRouterState(<RouterState>this, root);\n  }\n\n  override toString(): string {\n    return this.snapshot.toString();\n  }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>|null): RouterState {\n  const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n  const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n  const emptyParams = new BehaviorSubject({});\n  const emptyData = new BehaviorSubject({});\n  const emptyQueryParams = new BehaviorSubject({});\n  const fragment = new BehaviorSubject('');\n  const activated = new ActivatedRoute(\n      emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n      snapshot.root);\n  activated.snapshot = snapshot.root;\n  return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n    urlTree: UrlTree, rootComponent: Type<any>|null): RouterStateSnapshot {\n  const emptyParams = {};\n  const emptyData = {};\n  const emptyQueryParams = {};\n  const fragment = '';\n  const activated = new ActivatedRouteSnapshot(\n      [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n      urlTree.root, -1, {});\n  return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n *     header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n  /** The current snapshot of this route */\n  snapshot!: ActivatedRouteSnapshot;\n  /** @internal */\n  _futureSnapshot: ActivatedRouteSnapshot;\n  /** @internal */\n  _routerState!: RouterState;\n  /** @internal */\n  _paramMap!: Observable<ParamMap>;\n  /** @internal */\n  _queryParamMap!: Observable<ParamMap>;\n\n  /** @internal */\n  constructor(\n      /** An observable of the URL segments matched by this route. */\n      public url: Observable<UrlSegment[]>,\n      /** An observable of the matrix parameters scoped to this route. */\n      public params: Observable<Params>,\n      /** An observable of the query parameters shared by all the routes. */\n      public queryParams: Observable<Params>,\n      /** An observable of the URL fragment shared by all the routes. */\n      public fragment: Observable<string|null>,\n      /** An observable of the static and resolved data of this route. */\n      public data: Observable<Data>,\n      /** The outlet name of the route, a constant. */\n      public outlet: string,\n      /** The component of the route, a constant. */\n      // TODO(vsavkin): remove |string\n      public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n    this._futureSnapshot = futureSnapshot;\n  }\n\n  /** The configuration used to match this route. */\n  get routeConfig(): Route|null {\n    return this._futureSnapshot.routeConfig;\n  }\n\n  /** The root of the router state. */\n  get root(): ActivatedRoute {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree. */\n  get parent(): ActivatedRoute|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree. */\n  get firstChild(): ActivatedRoute|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree. */\n  get children(): ActivatedRoute[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route. */\n  get pathFromRoot(): ActivatedRoute[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  /**\n   * An Observable that contains a map of the required and optional parameters\n   * specific to the route.\n   * The map supports retrieving single and multiple values from the same parameter.\n   */\n  get paramMap(): Observable<ParamMap> {\n    if (!this._paramMap) {\n      this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._paramMap;\n  }\n\n  /**\n   * An Observable that contains a map of the query parameters available to all routes.\n   * The map supports retrieving single and multiple values from the query parameter.\n   */\n  get queryParamMap(): Observable<ParamMap> {\n    if (!this._queryParamMap) {\n      this._queryParamMap =\n          this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n  }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly'|'always';\n\n/** @internal */\nexport type Inherited = {\n  params: Params,\n  data: Data,\n  resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n    route: ActivatedRouteSnapshot,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n  const pathFromRoot = route.pathFromRoot;\n\n  let inheritingStartingFrom = 0;\n  if (paramsInheritanceStrategy !== 'always') {\n    inheritingStartingFrom = pathFromRoot.length - 1;\n\n    while (inheritingStartingFrom >= 1) {\n      const current = pathFromRoot[inheritingStartingFrom];\n      const parent = pathFromRoot[inheritingStartingFrom - 1];\n      // current route is an empty path => inherits its parent's params and data\n      if (current.routeConfig && current.routeConfig.path === '') {\n        inheritingStartingFrom--;\n\n        // parent is componentless => current route should inherit its params and data\n      } else if (!parent.component) {\n        inheritingStartingFrom--;\n\n      } else {\n        break;\n      }\n    }\n  }\n\n  return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n  return pathFromRoot.reduce((res, curr) => {\n    const params = {...res.params, ...curr.params};\n    const data = {...res.data, ...curr.data};\n    const resolve = {...res.resolve, ...curr._resolvedData};\n    return {params, data, resolve};\n  }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n *   constructor(route: ActivatedRoute) {\n *     const id: string = route.snapshot.params.id;\n *     const url: string = route.snapshot.url.join('');\n *     const user = route.snapshot.data.user;\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n  /** The configuration used to match this route **/\n  public readonly routeConfig: Route|null;\n  /** @internal **/\n  _urlSegment: UrlSegmentGroup;\n  /** @internal */\n  _lastPathIndex: number;\n  /** @internal */\n  _resolve: ResolveData;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _resolvedData!: Data;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _routerState!: RouterStateSnapshot;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _paramMap!: ParamMap;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The URL segments matched by this route */\n      public url: UrlSegment[],\n      /**\n       *  The matrix parameters scoped to this route.\n       *\n       *  You can compute all params (or data) in the router state or to get params outside\n       *  of an activated component by traversing the `RouterState` tree as in the following\n       *  example:\n       *  ```\n       *  collectRouteParams(router: Router) {\n       *    let params = {};\n       *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n       *    while (stack.length > 0) {\n       *      const route = stack.pop()!;\n       *      params = {...params, ...route.params};\n       *      stack.push(...route.children);\n       *    }\n       *    return params;\n       *  }\n       *  ```\n       */\n      public params: Params,\n      /** The query parameters shared by all the routes */\n      public queryParams: Params,\n      /** The URL fragment shared by all the routes */\n      public fragment: string|null,\n      /** The static and resolved data of this route */\n      public data: Data,\n      /** The outlet name of the route */\n      public outlet: string,\n      /** The component of the route */\n      public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n      lastPathIndex: number, resolve: ResolveData) {\n    this.routeConfig = routeConfig;\n    this._urlSegment = urlSegment;\n    this._lastPathIndex = lastPathIndex;\n    this._resolve = resolve;\n  }\n\n  /** The root of the router state */\n  get root(): ActivatedRouteSnapshot {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree */\n  get parent(): ActivatedRouteSnapshot|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree */\n  get firstChild(): ActivatedRouteSnapshot|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree */\n  get children(): ActivatedRouteSnapshot[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route */\n  get pathFromRoot(): ActivatedRouteSnapshot[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  get paramMap(): ParamMap {\n    if (!this._paramMap) {\n      this._paramMap = convertToParamMap(this.params);\n    }\n    return this._paramMap;\n  }\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    const url = this.url.map(segment => segment.toString()).join('/');\n    const matched = this.routeConfig ? this.routeConfig.path : '';\n    return `Route(url:'${url}', path:'${matched}')`;\n  }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const snapshot: RouterStateSnapshot = state.snapshot;\n *     const root: ActivatedRouteSnapshot = snapshot.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n  /** @internal */\n  constructor(\n      /** The url from which this snapshot was created */\n      public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n    super(root);\n    setRouterState(<RouterStateSnapshot>this, root);\n  }\n\n  override toString(): string {\n    return serializeNode(this._root);\n  }\n}\n\nfunction setRouterState<U, T extends {_routerState: U}>(state: U, node: TreeNode<T>): void {\n  node.value._routerState = state;\n  node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n  const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n  return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n  if (route.snapshot) {\n    const currentSnapshot = route.snapshot;\n    const nextSnapshot = route._futureSnapshot;\n    route.snapshot = nextSnapshot;\n    if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n      (<any>route.queryParams).next(nextSnapshot.queryParams);\n    }\n    if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n      (<any>route.fragment).next(nextSnapshot.fragment);\n    }\n    if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n      (<any>route.params).next(nextSnapshot.params);\n    }\n    if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n      (<any>route.url).next(nextSnapshot.url);\n    }\n    if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n      (<any>route.data).next(nextSnapshot.data);\n    }\n  } else {\n    route.snapshot = route._futureSnapshot;\n\n    // this is for resolved data\n    (<any>route.data).next(route._futureSnapshot.data);\n  }\n}\n\n\nexport function equalParamsAndUrlSegments(\n    a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n  const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n  const parentsMismatch = !a.parent !== !b.parent;\n\n  return equalUrlParams && !parentsMismatch &&\n      (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent!));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n    routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n    prevState: RouterState): RouterState {\n  const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n  return new RouterState(root, curr);\n}\n\nfunction createNode(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n  // reuse an activated route that is currently displayed on the screen\n  if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n    const value = prevState.value;\n    value._futureSnapshot = curr.value;\n    const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n    return new TreeNode<ActivatedRoute>(value, children);\n  } else {\n    if (routeReuseStrategy.shouldAttach(curr.value)) {\n      // retrieve an activated route that is used to be displayed, but is not currently displayed\n      const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n      if (detachedRouteHandle !== null) {\n        const tree = (detachedRouteHandle as DetachedRouteHandleInternal).route;\n        setFutureSnapshotsOfActivatedRoutes(curr, tree);\n        return tree;\n      }\n    }\n\n    const value = createActivatedRoute(curr.value);\n    const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n    return new TreeNode<ActivatedRoute>(value, children);\n  }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n    curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n  if (curr.value.routeConfig !== result.value.routeConfig) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n  }\n  if (curr.children.length !== result.children.length) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n  }\n  result.value._futureSnapshot = curr.value;\n  for (let i = 0; i < curr.children.length; ++i) {\n    setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n  }\n}\n\nfunction createOrReuseChildren(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState: TreeNode<ActivatedRoute>) {\n  return curr.children.map(child => {\n    for (const p of prevState.children) {\n      if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n        return createNode(routeReuseStrategy, child, p);\n      }\n    }\n    return createNode(routeReuseStrategy, child);\n  });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n  return new ActivatedRoute(\n      new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n      new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n    route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params|null,\n    fragment: string|null): UrlTree {\n  if (commands.length === 0) {\n    return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n  }\n\n  const nav = computeNavigation(commands);\n\n  if (nav.toRoot()) {\n    return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n  }\n\n  const startingPosition = findStartingPosition(nav, urlTree, route);\n\n  const segmentGroup = startingPosition.processChildren ?\n      updateSegmentGroupChildren(\n          startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n      updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n  return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n  return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command: any): command is {outlets: {[key: string]: any}} {\n  return typeof command === 'object' && command != null && command.outlets;\n}\n\nfunction tree(\n    oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n    queryParams: Params|null, fragment: string|null): UrlTree {\n  let qp: any = {};\n  if (queryParams) {\n    forEach(queryParams, (value: any, name: any) => {\n      qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n    });\n  }\n\n  if (urlTree.root === oldSegmentGroup) {\n    return new UrlTree(newSegmentGroup, qp, fragment);\n  }\n\n  return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n    current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n    newSegment: UrlSegmentGroup): UrlSegmentGroup {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n    if (c === oldSegment) {\n      children[outletName] = newSegment;\n    } else {\n      children[outletName] = replaceSegment(c, oldSegment, newSegment);\n    }\n  });\n  return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n  constructor(\n      public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n    if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n      throw new Error('Root segment cannot have matrix parameters');\n    }\n\n    const cmdWithOutlet = commands.find(isCommandWithOutlets);\n    if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n      throw new Error('{outlets:{}} has to be the last command');\n    }\n  }\n\n  public toRoot(): boolean {\n    return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n  }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n  if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n    return new Navigation(true, 0, commands);\n  }\n\n  let numberOfDoubleDots = 0;\n  let isAbsolute = false;\n\n  const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n    if (typeof cmd === 'object' && cmd != null) {\n      if (cmd.outlets) {\n        const outlets: {[k: string]: any} = {};\n        forEach(cmd.outlets, (commands: any, name: string) => {\n          outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n        });\n        return [...res, {outlets}];\n      }\n\n      if (cmd.segmentPath) {\n        return [...res, cmd.segmentPath];\n      }\n    }\n\n    if (!(typeof cmd === 'string')) {\n      return [...res, cmd];\n    }\n\n    if (cmdIdx === 0) {\n      cmd.split('/').forEach((urlPart, partIndex) => {\n        if (partIndex == 0 && urlPart === '.') {\n          // skip './a'\n        } else if (partIndex == 0 && urlPart === '') {  //  '/a'\n          isAbsolute = true;\n        } else if (urlPart === '..') {  //  '../a'\n          numberOfDoubleDots++;\n        } else if (urlPart != '') {\n          res.push(urlPart);\n        }\n      });\n\n      return res;\n    }\n\n    return [...res, cmd];\n  }, []);\n\n  return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n  constructor(\n      public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n  }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n  if (nav.isAbsolute) {\n    return new Position(tree.root, true, 0);\n  }\n\n  if (route.snapshot._lastPathIndex === -1) {\n    const segmentGroup = route.snapshot._urlSegment;\n    // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n    // see issue #26224, #13011, #35687\n    // However, if the ActivatedRoute is the root we should process children like above.\n    const processChildren = segmentGroup === tree.root;\n    return new Position(segmentGroup, processChildren, 0);\n  }\n\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = route.snapshot._lastPathIndex + modifier;\n  return createPositionApplyingDoubleDots(\n      route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n    group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n  let g = group;\n  let ci = index;\n  let dd = numberOfDoubleDots;\n  while (dd > ci) {\n    dd -= ci;\n    g = g.parent!;\n    if (!g) {\n      throw new Error('Invalid number of \\'../\\'');\n    }\n    ci = g.segments.length;\n  }\n  return new Position(g, false, ci - dd);\n}\n\nfunction getOutlets(commands: unknown[]): {[k: string]: unknown[]|string} {\n  if (isCommandWithOutlets(commands[0])) {\n    return commands[0].outlets;\n  }\n\n  return {[PRIMARY_OUTLET]: commands};\n}\n\nfunction updateSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (!segmentGroup) {\n    segmentGroup = new UrlSegmentGroup([], {});\n  }\n  if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n    return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n  }\n\n  const m = prefixedWith(segmentGroup, startIndex, commands);\n  const slicedCommands = commands.slice(m.commandIndex);\n  if (m.match && m.pathIndex < segmentGroup.segments.length) {\n    const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n    g.children[PRIMARY_OUTLET] =\n        new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n    return updateSegmentGroupChildren(g, 0, slicedCommands);\n  } else if (m.match && slicedCommands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else if (m.match && !segmentGroup.hasChildren()) {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  } else if (m.match) {\n    return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n  } else {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  }\n}\n\nfunction updateSegmentGroupChildren(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (commands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else {\n    const outlets = getOutlets(commands);\n    const children: {[key: string]: UrlSegmentGroup} = {};\n\n    forEach(outlets, (commands, outlet) => {\n      if (typeof commands === 'string') {\n        commands = [commands];\n      }\n      if (commands !== null) {\n        children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n      }\n    });\n\n    forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n      if (outlets[childOutlet] === undefined) {\n        children[childOutlet] = child;\n      }\n    });\n    return new UrlSegmentGroup(segmentGroup.segments, children);\n  }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n  let currentCommandIndex = 0;\n  let currentPathIndex = startIndex;\n\n  const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n  while (currentPathIndex < segmentGroup.segments.length) {\n    if (currentCommandIndex >= commands.length) return noMatch;\n    const path = segmentGroup.segments[currentPathIndex];\n    const command = commands[currentCommandIndex];\n    // Do not try to consume command as part of the prefixing if it has outlets because it can\n    // contain outlets other than the one being processed. Consuming the outlets command would\n    // result in other outlets being ignored.\n    if (isCommandWithOutlets(command)) {\n      break;\n    }\n    const curr = `${command}`;\n    const next =\n        currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n    if (currentPathIndex > 0 && curr === undefined) break;\n\n    if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n      if (!compare(curr, next, path)) return noMatch;\n      currentCommandIndex += 2;\n    } else {\n      if (!compare(curr, {}, path)) return noMatch;\n      currentCommandIndex++;\n    }\n    currentPathIndex++;\n  }\n\n  return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  const paths = segmentGroup.segments.slice(0, startIndex);\n\n  let i = 0;\n  while (i < commands.length) {\n    const command = commands[i];\n    if (isCommandWithOutlets(command)) {\n      const children = createNewSegmentChildren(command.outlets);\n      return new UrlSegmentGroup(paths, children);\n    }\n\n    // if we start with an object literal, we need to reuse the path part from the segment\n    if (i === 0 && isMatrixParams(commands[0])) {\n      const p = segmentGroup.segments[startIndex];\n      paths.push(new UrlSegment(p.path, stringify(commands[0])));\n      i++;\n      continue;\n    }\n\n    const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n    const next = (i < commands.length - 1) ? commands[i + 1] : null;\n    if (curr && next && isMatrixParams(next)) {\n      paths.push(new UrlSegment(curr, stringify(next)));\n      i += 2;\n    } else {\n      paths.push(new UrlSegment(curr, {}));\n      i++;\n    }\n  }\n  return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: unknown[]|string}):\n    {[outlet: string]: UrlSegmentGroup} {\n  const children: {[outlet: string]: UrlSegmentGroup} = {};\n  forEach(outlets, (commands, outlet) => {\n    if (typeof commands === 'string') {\n      commands = [commands];\n    }\n    if (commands !== null) {\n      children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n    }\n  });\n  return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n  const res: {[key: string]: string} = {};\n  forEach(params, (v: any, k: string) => res[k] = `${v}`);\n  return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n  return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, advanceActivatedRoute, RouterState} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport const activateRoutes =\n    (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n     forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n        map(t => {\n          new ActivateRoutes(\n              routeReuseStrategy, t.targetRouterState!, t.currentRouterState, forwardEvent)\n              .activate(rootContexts);\n          return t;\n        });\n\nexport class ActivateRoutes {\n  constructor(\n      private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n      private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n  activate(parentContexts: ChildrenOutletContexts): void {\n    const futureRoot = this.futureState._root;\n    const currRoot = this.currState ? this.currState._root : null;\n\n    this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n    advanceActivatedRoute(this.futureState.root);\n    this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n  }\n\n  // De-activate the child route that are not re-used for the future state\n  private deactivateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n    // Recurse on the routes active in the future state to de-activate deeper children\n    futureNode.children.forEach(futureChild => {\n      const childOutletName = futureChild.value.outlet;\n      this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n      delete children[childOutletName];\n    });\n\n    // De-activate the routes that will not be re-used\n    forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n      this.deactivateRouteAndItsChildren(v, contexts);\n    });\n  }\n\n  private deactivateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContext: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    if (future === curr) {\n      // Reusing the node, check to see if the children need to be de-activated\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContext.getContext(future.outlet);\n        if (context) {\n          this.deactivateChildRoutes(futureNode, currNode, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.deactivateChildRoutes(futureNode, currNode, parentContext);\n      }\n    } else {\n      if (curr) {\n        // Deactivate the current route which will not be re-used\n        this.deactivateRouteAndItsChildren(currNode, parentContext);\n      }\n    }\n  }\n\n  private deactivateRouteAndItsChildren(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n      this.detachAndStoreRouteSubtree(route, parentContexts);\n    } else {\n      this.deactivateRouteAndOutlet(route, parentContexts);\n    }\n  }\n\n  private detachAndStoreRouteSubtree(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    if (context && context.outlet) {\n      const componentRef = context.outlet.detach();\n      const contexts = context.children.onOutletDeactivated();\n      this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n    }\n  }\n\n  private deactivateRouteAndOutlet(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    // The context could be `null` if we are on a componentless route but there may still be\n    // children that need deactivating.\n    const contexts = context && route.value.component ? context.children : parentContexts;\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);\n\n    for (const childOutlet of Object.keys(children)) {\n      this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n    }\n\n    if (context && context.outlet) {\n      // Destroy the component\n      context.outlet.deactivate();\n      // Destroy the contexts for all the outlets that were in the component\n      context.children.onOutletDeactivated();\n      // Clear the information about the attached component on the context but keep the reference to\n      // the outlet.\n      context.attachRef = null;\n      context.resolver = null;\n      context.route = null;\n    }\n  }\n\n  private activateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outlet: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n    futureNode.children.forEach(c => {\n      this.activateRoutes(c, children[c.value.outlet], contexts);\n      this.forwardEvent(new ActivationEnd(c.value.snapshot));\n    });\n    if (futureNode.children.length) {\n      this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n    }\n  }\n\n  private activateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContexts: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    advanceActivatedRoute(future);\n\n    // reusing the node\n    if (future === curr) {\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n        this.activateChildRoutes(futureNode, currNode, context.children);\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, currNode, parentContexts);\n      }\n    } else {\n      if (future.component) {\n        // if we have a normal route, we need to place the component into the outlet and recurse.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n\n        if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n          const stored =\n              (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n          this.routeReuseStrategy.store(future.snapshot, null);\n          context.children.onOutletReAttached(stored.contexts);\n          context.attachRef = stored.componentRef;\n          context.route = stored.route.value;\n          if (context.outlet) {\n            // Attach right away when the outlet has already been instantiated\n            // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n            context.outlet.attach(stored.componentRef, stored.route.value);\n          }\n          advanceActivatedRouteNodeAndItsChildren(stored.route);\n        } else {\n          const config = parentLoadedConfig(future.snapshot);\n          const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n          context.attachRef = null;\n          context.route = future;\n          context.resolver = cmpFactoryResolver;\n          if (context.outlet) {\n            // Activate the outlet when it has already been instantiated\n            // Otherwise it will get activated from its `ngOnInit` when instantiated\n            context.outlet.activateWith(future, cmpFactoryResolver);\n          }\n\n          this.activateChildRoutes(futureNode, null, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, null, parentContexts);\n      }\n    }\n  }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n  advanceActivatedRoute(node.value);\n  node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n    if (route && route.component) return null;\n  }\n\n  return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * Represents a route configuration for the Router service.\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\n * in `Route.children`.\n *\n * @see `Route`\n * @see `Router`\n * @see [Router configuration guide](guide/router-reference#configuration)\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * Represents the result of matching URLs with a custom matching function.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @see `UrlMatcher()`\n * @publicApi\n */\nexport type UrlMatchResult = {\n  consumed: UrlSegment[];\n  posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * A function for matching a route against URLs. Implement a custom URL matcher\n * for `Route.matcher` when a combination of `path` and `pathMatch`\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\n *\n * The function takes the following arguments and returns a `UrlMatchResult` object.\n * * *segments* : An array of URL segments.\n * * *group* : A segment group.\n * * *route* : The route to match against.\n *\n * The following example implementation matches HTML files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n    UrlMatchResult|null;\n\n/**\n *\n * Represents static data associated with a particular route.\n *\n * @see `Route#data`\n *\n * @publicApi\n */\nexport type Data = {\n  [name: string]: any\n};\n\n/**\n *\n * Represents the resolved data associated with a particular route.\n *\n * @see `Route#resolve`.\n *\n * @publicApi\n */\nexport type ResolveData = {\n  [name: string]: any\n};\n\n/**\n *\n * A function that is called to resolve a collection of lazy-loaded routes.\n * Must be an arrow function of the following form:\n * `() => import('...').then(mod => mod.MODULE)`\n *\n * For example:\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @see [Route.loadChildren](api/router/Route#loadChildren)\n * @publicApi\n */\nexport type LoadChildrenCallback = () => Type<any>|NgModuleFactory<any>|Observable<Type<any>>|\n    Promise<NgModuleFactory<any>|Type<any>|any>;\n\n/**\n *\n * A function that returns a set of routes to load.\n *\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\n * form (`LoadChildrenCallback`) should be used instead.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n */\nexport type LoadChildren = LoadChildrenCallback|DeprecatedLoadChildren;\n\n/**\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n * @deprecated The `string` form of `loadChildren` is deprecated in favor of the\n * `LoadChildrenCallback` function which uses the ES dynamic `import()` expression.\n * This offers a more natural and standards-based mechanism to dynamically\n * load an ES module at runtime.\n */\nexport type DeprecatedLoadChildren = string;\n\n/**\n *\n * How to handle query parameters in a router link.\n * One of:\n * - `merge` : Merge new with current parameters.\n * - `preserve` : Preserve current parameters.\n *\n * @see `UrlCreationOptions#queryParamsHandling`\n * @see `RouterLink`\n * @publicApi\n */\nexport type QueryParamsHandling = 'merge'|'preserve'|'';\n\n/**\n *\n * A policy for when to run guards and resolvers on a route.\n *\n * @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)\n * @publicApi\n */\nexport type RunGuardsAndResolvers =\n    'pathParamsChange'|'pathParamsOrQueryParamsChange'|'paramsChange'|'paramsOrQueryParamsChange'|\n    'always'|((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * A configuration object that defines a single route.\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\n * The router attempts to match segments of a given URL against each route,\n * using the configuration options defined in this object.\n *\n * Supports static, parameterized, redirect, and wildcard routes, as well as\n * custom route data and resolve methods.\n *\n * For detailed usage information, see the [Routing Guide](guide/router).\n *\n * @usageNotes\n *\n * ### Simple Configuration\n *\n * The following route specifies that when navigating to, for example,\n * `/team/11/user/bob`, the router creates the 'Team' component\n * with the 'User' child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n  *  component: Team,\n *   children: [{\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * ### Multiple Outlets\n *\n * The following route creates sibling components with multiple outlets.\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team\n * }, {\n *   path: 'chat/:user',\n *   component: Chat\n *   outlet: 'aux'\n * }]\n * ```\n *\n * ### Wild Cards\n *\n * The following route uses wild-card notation to specify a component\n * that is always instantiated regardless of where you navigate to.\n *\n * ```\n * [{\n *   path: '**',\n *   component: WildcardComponent\n * }]\n * ```\n *\n * ### Redirects\n *\n * The following route uses the `redirectTo` property to ignore a segment of\n * a given URL when looking for a child path.\n *\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\n * the Team component with the User child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: 'legacy/user/:name',\n *     redirectTo: 'user/:name'\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * The redirect path can be relative, as shown in this example, or absolute.\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\n * the result URL is also absolute, '/user/jim'.\n\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any URL segments.\n *\n * In the following configuration, when navigating to\n * `/team/11`, the router instantiates the 'AllUsers' component.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: AllUsers\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * Empty-path routes can have children. In the following example, when navigating\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\n * the user component in it.\n *\n * Note that an empty path route inherits its parent's parameters and data.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: WrapperCmp,\n *     children: [{\n *       path: 'user/:name',\n *       component: User\n *     }]\n *   }]\n * }]\n * ```\n *\n * ### Matching Strategy\n *\n * The default path-match strategy is 'prefix', which means that the router\n * checks URL elements from the left to see if the URL matches a specified path.\n * For example, '/team/11/user' matches 'team/:id'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'prefix', //default\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * You can specify the path-match strategy 'full' to make sure that the path\n * covers the whole unconsumed URL. It is important to do this when redirecting\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating to the redirect destination,\n * creating an endless loop.\n *\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\n * that the router applies the redirect if and only if navigating to '/'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'full',\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * You can share parameters between sibling components.\n * For example, suppose that two sibling components should go next to each other,\n * and both of them require an ID parameter. You can accomplish this using a route\n * that does not specify a component at the top level.\n *\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\n * the main child and aux child components next to each other.\n * For this to work, the application component must have the primary and aux outlets defined.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: 'a', component: MainChild },\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * The router merges the parameters, data, and resolve of the componentless\n * parent into the parameters, data, and resolve of the children.\n *\n * This is especially useful when child components are defined\n * with an empty path string, as in the following example.\n * With this configuration, navigating to '/parent/10' creates\n * the main child and aux components.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: '', component: MainChild },\n *      { path: '', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up application load time by splitting the application\n * into multiple bundles and loading them on demand.\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\n * instead of the `children` property.\n *\n * Given the following example route, the router will lazy load\n * the associated module on demand using the browser native import system.\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @publicApi\n */\nexport interface Route {\n  /**\n   * The path to match against. Cannot be used together with a custom `matcher` function.\n   * A URL string that uses router matching notation.\n   * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\n   * Default is \"/\" (the root path).\n   *\n   */\n  path?: string;\n  /**\n   * The path-matching strategy, one of 'prefix' or 'full'.\n   * Default is 'prefix'.\n   *\n   * By default, the router checks URL elements from the left to see if the URL\n   * matches a given path and stops when there is a config match. Importantly there must still be a\n   * config match for each segment of the URL. For example, '/team/11/user' matches the prefix\n   * 'team/:id' if one of the route's children matches the segment 'user'. That is, the URL\n   * '/team/11/user` matches the config\n   * `{path: 'team/:id', children: [{path: ':user', component: User}]}`\n   * but does not match when there are no children as in `{path: 'team/:id', component: Team}`.\n   *\n   * The path-match strategy 'full' matches against the entire URL.\n   * It is important to do this when redirecting empty-path routes.\n   * Otherwise, because an empty path is a prefix of any URL,\n   * the router would apply the redirect even when navigating\n   * to the redirect destination, creating an endless loop.\n   *\n   */\n  pathMatch?: string;\n  /**\n   * A custom URL-matching function. Cannot be used together with `path`.\n   */\n  matcher?: UrlMatcher;\n  /**\n   * The component to instantiate when the path matches.\n   * Can be empty if child routes specify components.\n   */\n  component?: Type<any>;\n  /**\n   * A URL to redirect to when the path matches.\n   *\n   * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\n   * Note that no further redirects are evaluated after an absolute redirect.\n   *\n   * When not present, router does not redirect.\n   */\n  redirectTo?: string;\n  /**\n   * Name of a `RouterOutlet` object where the component can be placed\n   * when the path matches.\n   */\n  outlet?: string;\n  /**\n   * An array of dependency-injection tokens used to look up `CanActivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * activate the component. By default, any user can activate.\n   */\n  canActivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanActivateChild()` handlers,\n   * in order to determine if the current user is allowed to activate\n   * a child of the component. By default, any user can activate a child.\n   */\n  canActivateChild?: any[];\n  /**\n   * An array of DI tokens used to look up `CanDeactivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * deactivate the component. By default, any user can deactivate.\n   *\n   */\n  canDeactivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanLoad()`\n   * handlers, in order to determine if the current user is allowed to\n   * load the component. By default, any user can load.\n   */\n  canLoad?: any[];\n  /**\n   * Additional developer-defined data provided to the component via\n   * `ActivatedRoute`. By default, no additional data is passed.\n   */\n  data?: Data;\n  /**\n   * A map of DI tokens used to look up data resolvers. See `Resolve`.\n   */\n  resolve?: ResolveData;\n  /**\n   * An array of child `Route` objects that specifies a nested route\n   * configuration.\n   */\n  children?: Routes;\n  /**\n   * An object specifying lazy-loaded child routes.\n   */\n  loadChildren?: LoadChildren;\n  /**\n   * Defines when guards and resolvers will be run. One of\n   * - `paramsOrQueryParamsChange` : Run when query parameters change.\n   * - `always` : Run on every execution.\n   * By default, guards and resolvers run only when the matrix\n   * parameters of the route change.\n   */\n  runGuardsAndResolvers?: RunGuardsAndResolvers;\n  /**\n   * Filled for routes with `loadChildren` once the module has been loaded\n   * @internal\n   */\n  _loadedConfig?: LoadedRouterConfig;\n  /**\n   * Filled for routes with `loadChildren` during load\n   * @internal\n   */\n  _loader$?: Observable<LoadedRouterConfig>;\n}\n\nexport class LoadedRouterConfig {\n  constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n *   return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n *   return fn(1, 2);\n * } else {\n *   throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n  return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n  return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n  return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n  return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n  return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n  return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n  return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {combineLatest, Observable, OperatorFunction} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n    OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n  return switchMap(obs => {\n    return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n               .pipe(\n                   scan(\n                       (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n                         let isPending = false;\n                         return list.reduce((innerAcc, val, i: number) => {\n                           if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n                           // Toggle pending flag if any values haven't been set yet\n                           if (val === INITIAL_VALUE) isPending = true;\n\n                           // Any other return values are only valid if we haven't yet hit a pending\n                           // call. This guarantees that in the case of a guard at the bottom of the\n                           // tree that returns a redirect, we will wait for the higher priority\n                           // guard at the top to finish before performing the redirect.\n                           if (!isPending) {\n                             // Early return when we hit a `false` value as that should always\n                             // cancel navigation\n                             if (val === false) return val;\n\n                             if (i === list.length - 1 || isUrlTree(val)) {\n                               return val;\n                             }\n                           }\n\n                           return innerAcc;\n                         }, acc);\n                       },\n                       INITIAL_VALUE),\n                   filter(item => item !== INITIAL_VALUE),\n                   map(item => isUrlTree(item) ? item : item === true),  //\n                   take(1)) as Observable<boolean|UrlTree>;\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class ɵEmptyOutletComponent {\n}\n\nexport {ɵEmptyOutletComponent as EmptyOutletComponent};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EmptyOutletComponent} from '../components/empty_outlet';\nimport {Route, Routes} from '../config';\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n  // forEach doesn't iterate undefined values\n  for (let i = 0; i < config.length; i++) {\n    const route: Route = config[i];\n    const fullPath: string = getFullPath(parentPath, route);\n    validateNode(route, fullPath);\n  }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (!route) {\n      throw new Error(`\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n    }\n    if (Array.isArray(route)) {\n      throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n    }\n    if (!route.component && !route.children && !route.loadChildren &&\n        (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n    }\n    if (route.redirectTo && route.children) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and children cannot be used together`);\n    }\n    if (route.redirectTo && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and loadChildren cannot be used together`);\n    }\n    if (route.children && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': children and loadChildren cannot be used together`);\n    }\n    if (route.redirectTo && route.component) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and component cannot be used together`);\n    }\n    if (route.redirectTo && route.canActivate) {\n      throw new Error(\n          `Invalid configuration of route '${\n              fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n          `so canActivate will never be executed.`);\n    }\n    if (route.path && route.matcher) {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n    }\n    if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n    }\n    if (route.path === void 0 && route.matcher === void 0) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': routes must have either a path or a matcher specified`);\n    }\n    if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n    }\n    if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n      const exp =\n          `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n      throw new Error(`Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${\n          route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n    }\n    if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n    }\n  }\n  if (route.children) {\n    validateConfig(route.children, fullPath);\n  }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n  if (!currentRoute) {\n    return parentPath;\n  }\n  if (!parentPath && !currentRoute.path) {\n    return '';\n  } else if (parentPath && !currentRoute.path) {\n    return `${parentPath}/`;\n  } else if (!parentPath && currentRoute.path) {\n    return currentRoute.path;\n  } else {\n    return `${parentPath}/${currentRoute.path}`;\n  }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n  const children = r.children && r.children.map(standardizeConfig);\n  const c = children ? {...r, children} : {...r};\n  if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n    c.component = EmptyOutletComponent;\n  }\n  return c;\n}\n\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nexport function getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\n\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nexport function sortByMatchingOutlets(routes: Routes, outletName: string): Routes {\n  const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n  sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n  return sortedConfig;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from '../config';\nimport {defaultUrlMatcher, PRIMARY_OUTLET} from '../shared';\nimport {UrlSegment, UrlSegmentGroup} from '../url_tree';\n\nimport {forEach} from './collection';\nimport {getOutlet} from './config';\n\nexport interface MatchResult {\n  matched: boolean;\n  consumedSegments: UrlSegment[];\n  lastChild: number;\n  parameters: {[k: string]: string};\n  positionalParamSegments: {[k: string]: UrlSegment};\n}\n\nconst noMatch: MatchResult = {\n  matched: false,\n  consumedSegments: [],\n  lastChild: 0,\n  parameters: {},\n  positionalParamSegments: {}\n};\n\nexport function match(\n    segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n  if (route.path === '') {\n    if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n      return {...noMatch};\n    }\n\n    return {\n      matched: true,\n      consumedSegments: [],\n      lastChild: 0,\n      parameters: {},\n      positionalParamSegments: {}\n    };\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n  if (!res) return {...noMatch};\n\n  const posParams: {[n: string]: string} = {};\n  forEach(res.posParams!, (v: UrlSegment, k: string) => {\n    posParams[k] = v.path;\n  });\n  const parameters = res.consumed.length > 0 ?\n      {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n      posParams;\n\n  return {\n    matched: true,\n    consumedSegments: res.consumed,\n    lastChild: res.consumed.length,\n    // TODO(atscott): investigate combining parameters and positionalParamSegments\n    parameters,\n    positionalParamSegments: res.posParams ?? {}\n  };\n}\n\nexport function split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[], relativeLinkResolution: 'legacy'|'corrected' = 'corrected') {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments,\n        createChildrenForEmptyPaths(\n            segmentGroup, consumedSegments, config,\n            new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments,\n        addEmptyPathsToChildrenIfNeeded(\n            segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children,\n            relativeLinkResolution));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments};\n  }\n\n  const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n  s._sourceSegment = segmentGroup;\n  s._segmentIndexShift = consumedSegments.length;\n  return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    routes: Route[], children: {[name: string]: UrlSegmentGroup},\n    relativeLinkResolution: 'legacy'|'corrected'): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  for (const r of routes) {\n    if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      if (relativeLinkResolution === 'legacy') {\n        s._segmentIndexShift = segmentGroup.segments.length;\n      } else {\n        s._segmentIndexShift = consumedSegments.length;\n      }\n      res[getOutlet(r)] = s;\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n    primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegment;\n  primarySegment._sourceSegment = segmentGroup;\n  primarySegment._segmentIndexShift = consumedSegments.length;\n\n  for (const r of routes) {\n    if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      s._segmentIndexShift = consumedSegments.length;\n      res[getOutlet(r)] = s;\n    }\n  }\n  return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '';\n}\n\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nexport function isImmediateMatch(\n    route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n  // a config like\n  // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n  // or even\n  // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n  //\n  // The exception here is when the segment outlet is for the primary outlet. This would\n  // result in a match inside the named outlet because all children there are written as primary\n  // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n  // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n  // This should only match if the url is `/(x:b)`.\n  if (getOutlet(route) !== outlet &&\n      (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n    return false;\n  }\n  if (route.path === '**') {\n    return true;\n  }\n  return match(rawSegment, route, segments).matched;\n}\n\nexport function noLeftoversInUrl(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  return segments.length === 0 && !segmentGroup.children[outlet];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, from, Observable, Observer, of} from 'rxjs';\nimport {catchError, concatMap, first, last, map, mergeMap, scan, tap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {prioritizedGuardValue} from './operators/prioritized_guard_value';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {navigationCancelingError, Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, wrapIntoObservable} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {isCanLoad, isFunction, isUrlTree} from './utils/type_guards';\n\nclass NoMatch {\n  public segmentGroup: UrlSegmentGroup|null;\n\n  constructor(segmentGroup?: UrlSegmentGroup) {\n    this.segmentGroup = segmentGroup || null;\n  }\n}\n\nclass AbsoluteRedirect {\n  constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n          `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n  return new Observable<LoadedRouterConfig>(\n      (obs: Observer<LoadedRouterConfig>) => obs.error(\n          navigationCancelingError(`Cannot load children because the guard of the route \"path: '${\n              route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n  return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n  private allowRedirects: boolean = true;\n  private ngModule: NgModuleRef<any>;\n\n  constructor(\n      moduleInjector: Injector, private configLoader: RouterConfigLoader,\n      private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n    this.ngModule = moduleInjector.get(NgModuleRef);\n  }\n\n  apply(): Observable<UrlTree> {\n    const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n    // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is\n    // only necessary to prevent failures in tests which assert exact object matches. The `split` is\n    // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these\n    // properties. Before the implementations were merged, the `applyRedirects` would not assign\n    // them. We should be able to remove this logic as a \"breaking change\" but should do some more\n    // investigation into the failures first.\n    const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children);\n\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    const urlTrees$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n    }));\n    return urlTrees$.pipe(catchError((e: any) => {\n      if (e instanceof AbsoluteRedirect) {\n        // After an absolute redirect we do not apply any more redirects!\n        // If this implementation changes, update the documentation note in `redirectTo`.\n        this.allowRedirects = false;\n        // we need to run matching, so we can fetch all lazy-loaded modules\n        return this.match(e.urlTree);\n      }\n\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private match(tree: UrlTree): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n    const mapped$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n    }));\n    return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private noMatchError(e: NoMatch): any {\n    return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n  }\n\n  private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string|null):\n      UrlTree {\n    const root = rootCandidate.segments.length > 0 ?\n        new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n        rootCandidate;\n    return new UrlTree(root, queryParams, fragment);\n  }\n\n  private expandSegmentGroup(\n      ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n      outlet: string): Observable<UrlSegmentGroup> {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.expandChildren(ngModule, routes, segmentGroup)\n          .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n    }\n\n    return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n  }\n\n  // Recursively expand segment groups for all the child outlets\n  private expandChildren(\n      ngModule: NgModuleRef<any>, routes: Route[],\n      segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n    // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n    // because an absolute redirect from the primary outlet takes precedence.\n    const childOutlets: string[] = [];\n    for (const child of Object.keys(segmentGroup.children)) {\n      if (child === 'primary') {\n        childOutlets.unshift(child);\n      } else {\n        childOutlets.push(child);\n      }\n    }\n\n    return from(childOutlets)\n        .pipe(\n            concatMap(childOutlet => {\n              const child = segmentGroup.children[childOutlet];\n              // Sort the routes so routes with outlets that match the segment appear\n              // first, followed by routes for other outlets, which might match if they have an\n              // empty path.\n              const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n              return this.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet)\n                  .pipe(map(s => ({segment: s, outlet: childOutlet})));\n            }),\n            scan(\n                (children, expandedChild) => {\n                  children[expandedChild.outlet] = expandedChild.segment;\n                  return children;\n                },\n                {} as {[outlet: string]: UrlSegmentGroup}),\n            last(),\n        );\n  }\n\n  private expandSegment(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n      segments: UrlSegment[], outlet: string,\n      allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    return from(routes).pipe(\n        concatMap((r: any) => {\n          const expanded$ = this.expandSegmentAgainstRoute(\n              ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n          return expanded$.pipe(catchError((e: any) => {\n            if (e instanceof NoMatch) {\n              return of(null);\n            }\n            throw e;\n          }));\n        }),\n        first((s): s is UrlSegmentGroup => !!s), catchError((e: any, _: any) => {\n          if (e instanceof EmptyError || e.name === 'EmptyError') {\n            if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n              return of(new UrlSegmentGroup([], {}));\n            }\n            throw new NoMatch(segmentGroup);\n          }\n          throw e;\n        }));\n  }\n\n  private expandSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n      return noMatch(segmentGroup);\n    }\n\n    if (route.redirectTo === undefined) {\n      return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet);\n    }\n\n    if (allowRedirects && this.allowRedirects) {\n      return this.expandSegmentAgainstRouteUsingRedirect(\n          ngModule, segmentGroup, routes, route, paths, outlet);\n    }\n\n    return noMatch(segmentGroup);\n  }\n\n  private expandSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n          ngModule, routes, route, outlet);\n    }\n\n    return this.expandRegularSegmentAgainstRouteUsingRedirect(\n        ngModule, segmentGroup, routes, route, segments, outlet);\n  }\n\n  private expandWildCardWithParamsAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n      outlet: string): Observable<UrlSegmentGroup> {\n    const newTree = this.applyRedirectCommands([], route.redirectTo!, {});\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      const group = new UrlSegmentGroup(newSegments, {});\n      return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n    }));\n  }\n\n  private expandRegularSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    const {matched, consumedSegments, lastChild, positionalParamSegments} =\n        match(segmentGroup, route, segments);\n    if (!matched) return noMatch(segmentGroup);\n\n    const newTree =\n        this.applyRedirectCommands(consumedSegments, route.redirectTo!, positionalParamSegments);\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      return this.expandSegment(\n          ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n          false);\n    }));\n  }\n\n  private matchSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      if (route.loadChildren) {\n        const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                              this.configLoader.load(ngModule.injector, route);\n        return loaded$.pipe(map((cfg: LoadedRouterConfig) => {\n          route._loadedConfig = cfg;\n          return new UrlSegmentGroup(segments, {});\n        }));\n      }\n\n      return of(new UrlSegmentGroup(segments, {}));\n    }\n\n    const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n    if (!matched) return noMatch(rawSegmentGroup);\n\n    const rawSlicedSegments = segments.slice(lastChild);\n    const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n    return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n      const childModule = routerConfig.module;\n      const childConfig = routerConfig.routes;\n\n      const {segmentGroup: splitSegmentGroup, slicedSegments} =\n          split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n      // See comment on the other call to `split` about why this is necessary.\n      const segmentGroup =\n          new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n\n      if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n        const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n        return expanded$.pipe(\n            map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n      }\n\n      if (childConfig.length === 0 && slicedSegments.length === 0) {\n        return of(new UrlSegmentGroup(consumedSegments, {}));\n      }\n\n      const matchedOnOutlet = getOutlet(route) === outlet;\n      const expanded$ = this.expandSegment(\n          childModule, segmentGroup, childConfig, slicedSegments,\n          matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n      return expanded$.pipe(\n          map((cs: UrlSegmentGroup) =>\n                  new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n    }));\n  }\n\n  private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n      Observable<LoadedRouterConfig> {\n    if (route.children) {\n      // The children belong to the same module\n      return of(new LoadedRouterConfig(route.children, ngModule));\n    }\n\n    if (route.loadChildren) {\n      // lazy children belong to the loaded module\n      if (route._loadedConfig !== undefined) {\n        return of(route._loadedConfig);\n      }\n\n      return this.runCanLoadGuards(ngModule.injector, route, segments)\n          .pipe(mergeMap((shouldLoadResult: boolean) => {\n            if (shouldLoadResult) {\n              return this.configLoader.load(ngModule.injector, route)\n                  .pipe(map((cfg: LoadedRouterConfig) => {\n                    route._loadedConfig = cfg;\n                    return cfg;\n                  }));\n            }\n            return canLoadFails(route);\n          }));\n    }\n\n    return of(new LoadedRouterConfig([], ngModule));\n  }\n\n  private runCanLoadGuards(moduleInjector: Injector, route: Route, segments: UrlSegment[]):\n      Observable<boolean> {\n    const canLoad = route.canLoad;\n    if (!canLoad || canLoad.length === 0) return of(true);\n\n    const canLoadObservables = canLoad.map((injectionToken: any) => {\n      const guard = moduleInjector.get(injectionToken);\n      let guardVal;\n      if (isCanLoad(guard)) {\n        guardVal = guard.canLoad(route, segments);\n      } else if (isFunction<CanLoadFn>(guard)) {\n        guardVal = guard(route, segments);\n      } else {\n        throw new Error('Invalid CanLoad guard');\n      }\n      return wrapIntoObservable(guardVal);\n    });\n\n    return of(canLoadObservables)\n        .pipe(\n            prioritizedGuardValue(),\n            tap((result: UrlTree|boolean) => {\n              if (!isUrlTree(result)) return;\n\n              const error: Error&{url?: UrlTree} = navigationCancelingError(\n                  `Redirecting to \"${this.urlSerializer.serialize(result)}\"`);\n              error.url = result;\n              throw error;\n            }),\n            map(result => result === true),\n        );\n  }\n\n  private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n    let res: UrlSegment[] = [];\n    let c = urlTree.root;\n    while (true) {\n      res = res.concat(c.segments);\n      if (c.numberOfChildren === 0) {\n        return of(res);\n      }\n\n      if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n        return namedOutletsRedirect(route.redirectTo!);\n      }\n\n      c = c.children[PRIMARY_OUTLET];\n    }\n  }\n\n  private applyRedirectCommands(\n      segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n    return this.applyRedirectCreatreUrlTree(\n        redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n  }\n\n  private applyRedirectCreatreUrlTree(\n      redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlTree {\n    const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n    return new UrlTree(\n        newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n        urlTree.fragment);\n  }\n\n  private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n    const res: Params = {};\n    forEach(redirectToParams, (v: any, k: string) => {\n      const copySourceValue = typeof v === 'string' && v.startsWith(':');\n      if (copySourceValue) {\n        const sourceName = v.substring(1);\n        res[k] = actualParams[sourceName];\n      } else {\n        res[k] = v;\n      }\n    });\n    return res;\n  }\n\n  private createSegmentGroup(\n      redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n    const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n    let children: {[n: string]: UrlSegmentGroup} = {};\n    forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n      children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n    });\n\n    return new UrlSegmentGroup(updatedSegments, children);\n  }\n\n  private createSegments(\n      redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n    return redirectToSegments.map(\n        s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n                                      this.findOrReturn(s, actualSegments));\n  }\n\n  private findPosParam(\n      redirectTo: string, redirectToUrlSegment: UrlSegment,\n      posParams: {[k: string]: UrlSegment}): UrlSegment {\n    const pos = posParams[redirectToUrlSegment.path.substring(1)];\n    if (!pos)\n      throw new Error(\n          `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n    return pos;\n  }\n\n  private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n    let idx = 0;\n    for (const s of actualSegments) {\n      if (s.path === redirectToUrlSegment.path) {\n        actualSegments.splice(idx);\n        return s;\n      }\n      idx++;\n    }\n    return redirectToUrlSegment;\n  }\n}\n\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n  if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n    const c = s.children[PRIMARY_OUTLET];\n    return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n  }\n\n  return s;\n}\n\n/**\n * Recursively merges primary segment children into their parents and also drops empty children\n * (those which have no segments and no children themselves). The latter prevents serializing a\n * group into something like `/a(aux:)`, where `aux` is an empty child segment.\n */\nfunction squashSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  const newChildren = {} as any;\n  for (const childOutlet of Object.keys(segmentGroup.children)) {\n    const child = segmentGroup.children[childOutlet];\n    const childCandidate = squashSegmentGroup(child);\n    // don't add empty children\n    if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n      newChildren[childOutlet] = childCandidate;\n    }\n  }\n  const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n  return mergeTrivialChildren(s);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n  return switchMap(\n      t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n               .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, equalParamsAndUrlSegments, RouterStateSnapshot} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport class CanActivate {\n  readonly route: ActivatedRouteSnapshot;\n  constructor(public path: ActivatedRouteSnapshot[]) {\n    this.route = this.path[this.path.length - 1];\n  }\n}\n\nexport class CanDeactivate {\n  constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n  canDeactivateChecks: CanDeactivate[],\n  canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n    future: RouterStateSnapshot, curr: RouterStateSnapshot,\n    parentContexts: ChildrenOutletContexts) {\n  const futureRoot = future._root;\n  const currRoot = curr ? curr._root : null;\n\n  return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n    {node: ActivatedRouteSnapshot, guards: any[]}|null {\n  const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n  if (!canActivateChild || canActivateChild.length === 0) return null;\n  return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n    token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n  const config = getClosestLoadedConfig(snapshot);\n  const injector = config ? config.module.injector : moduleInjector;\n  return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  if (!snapshot) return null;\n\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n  }\n\n  return null;\n}\n\nfunction getChildRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>|null,\n    contexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[], checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const prevChildren = nodeChildrenAsMap(currNode);\n\n  // Process the children of the future route\n  futureNode.children.forEach(c => {\n    getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n    delete prevChildren[c.value.outlet];\n  });\n\n  // Process any children left from the current route (not active for the future route)\n  forEach(\n      prevChildren,\n      (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n          deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks));\n\n  return checks;\n}\n\nfunction getRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n    parentContexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[],\n    checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const future = futureNode.value;\n  const curr = currNode ? currNode.value : null;\n  const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n  // reusing the node\n  if (curr && future.routeConfig === curr.routeConfig) {\n    const shouldRun =\n        shouldRunGuardsAndResolvers(curr, future, future.routeConfig!.runGuardsAndResolvers);\n    if (shouldRun) {\n      checks.canActivateChecks.push(new CanActivate(futurePath));\n    } else {\n      // we need to set the data\n      future.data = curr.data;\n      future._resolvedData = curr._resolvedData;\n    }\n\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(\n          futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n    }\n\n    if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n      checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n    }\n  } else {\n    if (curr) {\n      deactivateRouteAndItsChildren(currNode, context, checks);\n    }\n\n    checks.canActivateChecks.push(new CanActivate(futurePath));\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n    }\n  }\n\n  return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n    curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n    mode: RunGuardsAndResolvers|undefined): boolean {\n  if (typeof mode === 'function') {\n    return mode(curr, future);\n  }\n  switch (mode) {\n    case 'pathParamsChange':\n      return !equalPath(curr.url, future.url);\n\n    case 'pathParamsOrQueryParamsChange':\n      return !equalPath(curr.url, future.url) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'always':\n      return true;\n\n    case 'paramsOrQueryParamsChange':\n      return !equalParamsAndUrlSegments(curr, future) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'paramsChange':\n    default:\n      return !equalParamsAndUrlSegments(curr, future);\n  }\n}\n\nfunction deactivateRouteAndItsChildren(\n    route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext|null, checks: Checks): void {\n  const children = nodeChildrenAsMap(route);\n  const r = route.value;\n\n  forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n    if (!r.component) {\n      deactivateRouteAndItsChildren(node, context, checks);\n    } else if (context) {\n      deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n    } else {\n      deactivateRouteAndItsChildren(node, null, checks);\n    }\n  });\n\n  if (!r.component) {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  } else if (context && context.outlet && context.outlet.isActivated) {\n    checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n  } else {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {concat, defer, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n    MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n    if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n      return of({...t, guardsResult: true});\n    }\n\n    return runCanDeactivateChecks(\n               canDeactivateChecks, targetSnapshot!, currentSnapshot, moduleInjector)\n        .pipe(\n            mergeMap(canDeactivate => {\n              return canDeactivate && isBoolean(canDeactivate) ?\n                  runCanActivateChecks(\n                      targetSnapshot!, canActivateChecks, moduleInjector, forwardEvent) :\n                  of(canDeactivate);\n            }),\n            map(guardsResult => ({...t, guardsResult})));\n  });\n}\n\nfunction runCanDeactivateChecks(\n    checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n    moduleInjector: Injector) {\n  return from(checks).pipe(\n      mergeMap(\n          check =>\n              runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n    futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n    forwardEvent?: (evt: Event) => void) {\n  return from(checks).pipe(\n      concatMap((check: CanActivate) => {\n        return concat(\n            fireChildActivationStart(check.route.parent, forwardEvent),\n            fireActivationStart(check.route, forwardEvent),\n            runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n            runCanActivate(futureSnapshot, check.route, moduleInjector));\n      }),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ActivationStart(snapshot));\n  }\n  return of(true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ChildActivationStart(snapshot));\n  }\n  return of(true);\n}\n\nfunction runCanActivate(\n    futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n  if (!canActivate || canActivate.length === 0) return of(true);\n\n  const canActivateObservables = canActivate.map((c: any) => {\n    return defer(() => {\n      const guard = getToken(c, futureARS, moduleInjector);\n      let observable;\n      if (isCanActivate(guard)) {\n        observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n      } else if (isFunction<CanActivateFn>(guard)) {\n        observable = wrapIntoObservable(guard(futureARS, futureRSS));\n      } else {\n        throw new Error('Invalid CanActivate guard');\n      }\n      return observable.pipe(first());\n    });\n  });\n  return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n    futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const futureARS = path[path.length - 1];\n\n  const canActivateChildGuards = path.slice(0, path.length - 1)\n                                     .reverse()\n                                     .map(p => getCanActivateChild(p))\n                                     .filter(_ => _ !== null);\n\n  const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n    return defer(() => {\n      const guardsMapped = d.guards.map((c: any) => {\n        const guard = getToken(c, d.node, moduleInjector);\n        let observable;\n        if (isCanActivateChild(guard)) {\n          observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n        } else if (isFunction<CanActivateChildFn>(guard)) {\n          observable = wrapIntoObservable(guard(futureARS, futureRSS));\n        } else {\n          throw new Error('Invalid CanActivateChild guard');\n        }\n        return observable.pipe(first());\n      });\n      return of(guardsMapped).pipe(prioritizedGuardValue());\n    });\n  });\n  return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n    component: Object|null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n    futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n  if (!canDeactivate || canDeactivate.length === 0) return of(true);\n  const canDeactivateObservables = canDeactivate.map((c: any) => {\n    const guard = getToken(c, currARS, moduleInjector);\n    let observable;\n    if (isCanDeactivate(guard)) {\n      observable = wrapIntoObservable(guard.canDeactivate(component!, currARS, currRSS, futureRSS));\n    } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n      observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n    } else {\n      throw new Error('Invalid CanDeactivate guard');\n    }\n    return observable.pipe(first());\n  });\n  return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of} from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, ParamsInheritanceStrategy, RouterStateSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {last} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nfunction newObservableError(e: unknown): Observable<RouterStateSnapshot> {\n  // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n  return new Observable<RouterStateSnapshot>((obs: Observer<RouterStateSnapshot>) => obs.error(e));\n}\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Routes, urlTree: UrlTree, url: string,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n    relativeLinkResolution: 'legacy'|'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n  try {\n    const result = new Recognizer(\n                       rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n                       relativeLinkResolution)\n                       .recognize();\n    if (result === null) {\n      return newObservableError(new NoMatch());\n    } else {\n      return of(result);\n    }\n  } catch (e) {\n    // Catch the potential error from recognize due to duplicate outlet matches and return as an\n    // `Observable` error instead.\n    return newObservableError(e);\n  }\n}\n\nexport class Recognizer {\n  constructor(\n      private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n      private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n      private relativeLinkResolution: 'legacy'|'corrected') {}\n\n  recognize(): RouterStateSnapshot|null {\n    const rootSegmentGroup =\n        split(\n            this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined),\n            this.relativeLinkResolution)\n            .segmentGroup;\n\n    const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    if (children === null) {\n      return null;\n    }\n\n    // Use Object.freeze to prevent readers of the Router state from modifying it outside of a\n    // navigation, resulting in the router being out of sync with the browser.\n    const root = new ActivatedRouteSnapshot(\n        [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n        {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n\n    const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n    const routeState = new RouterStateSnapshot(this.url, rootNode);\n    this.inheritParamsAndData(routeState._root);\n    return routeState;\n  }\n\n  inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n    const route = routeNode.value;\n\n    const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n    route.params = Object.freeze(i.params);\n    route.data = Object.freeze(i.data);\n\n    routeNode.children.forEach(n => this.inheritParamsAndData(n));\n  }\n\n  processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.processChildren(config, segmentGroup);\n    }\n\n    return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n  }\n\n  /**\n   * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n   * we cannot find a match for _any_ of the children.\n   *\n   * @param config - The `Routes` to match against\n   * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n   *     config.\n   */\n  processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    const children: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n    for (const childOutlet of Object.keys(segmentGroup.children)) {\n      const child = segmentGroup.children[childOutlet];\n      // Sort the config so that routes with outlets that match the one being activated appear\n      // first, followed by routes for other outlets, which might match if they have an empty path.\n      const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n      const outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet);\n      if (outletChildren === null) {\n        // Configs must match all segment children so because we did not find a match for this\n        // outlet, return `null`.\n        return null;\n      }\n      children.push(...outletChildren);\n    }\n    // Because we may have matched two outlets to the same empty path segment, we can have multiple\n    // activated results for the same outlet. We should merge the children of these results so the\n    // final return value is only one `TreeNode` per outlet.\n    const mergedChildren = mergeEmptyPathMatches(children);\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      // This should really never happen - we are only taking the first match for each outlet and\n      // merge the empty path matches.\n      checkOutletNameUniqueness(mergedChildren);\n    }\n    sortActivatedRouteSnapshots(mergedChildren);\n    return mergedChildren;\n  }\n\n  processSegment(\n      config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    for (const r of config) {\n      const children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n      if (children !== null) {\n        return children;\n      }\n    }\n    if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n      return [];\n    }\n\n    return null;\n  }\n\n  processSegmentAgainstRoute(\n      route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return null;\n\n    let snapshot: ActivatedRouteSnapshot;\n    let consumedSegments: UrlSegment[] = [];\n    let rawSlicedSegments: UrlSegment[] = [];\n\n    if (route.path === '**') {\n      const params = segments.length > 0 ? last(segments)!.parameters : {};\n      snapshot = new ActivatedRouteSnapshot(\n          segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n          getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length,\n          getResolve(route));\n    } else {\n      const result = match(rawSegment, route, segments);\n      if (!result.matched) {\n        return null;\n      }\n      consumedSegments = result.consumedSegments;\n      rawSlicedSegments = segments.slice(result.lastChild);\n\n      snapshot = new ActivatedRouteSnapshot(\n          consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment, getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n    }\n\n    const childConfig: Route[] = getChildConfig(route);\n\n    const {segmentGroup, slicedSegments} = split(\n        rawSegment, consumedSegments, rawSlicedSegments,\n        // Filter out routes with redirectTo because we are trying to create activated route\n        // snapshots and don't handle redirects here. That should have been done in\n        // `applyRedirects`.\n        childConfig.filter(c => c.redirectTo === undefined), this.relativeLinkResolution);\n\n    if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n      const children = this.processChildren(childConfig, segmentGroup);\n      if (children === null) {\n        return null;\n      }\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n    }\n\n    if (childConfig.length === 0 && slicedSegments.length === 0) {\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n    }\n\n    const matchedOnOutlet = getOutlet(route) === outlet;\n    // If we matched a config due to empty path match on a different outlet, we need to continue\n    // passing the current outlet for the segment rather than switch to PRIMARY.\n    // Note that we switch to primary when we have a match because outlet configs look like this:\n    // {path: 'a', outlet: 'a', children: [\n    //  {path: 'b', component: B},\n    //  {path: 'c', component: C},\n    // ]}\n    // Notice that the children of the named outlet are configured with the primary outlet\n    const children = this.processSegment(\n        childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet);\n    if (children === null) {\n      return null;\n    }\n    return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n  }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  nodes.sort((a, b) => {\n    if (a.value.outlet === PRIMARY_OUTLET) return -1;\n    if (b.value.outlet === PRIMARY_OUTLET) return 1;\n    return a.value.outlet.localeCompare(b.value.outlet);\n  });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n  if (route.children) {\n    return route.children;\n  }\n\n  if (route.loadChildren) {\n    return route._loadedConfig!.routes;\n  }\n\n  return [];\n}\n\nfunction hasEmptyPathConfig(node: TreeNode<ActivatedRouteSnapshot>) {\n  const config = node.value.routeConfig;\n  return config && config.path === '' && config.redirectTo === undefined;\n}\n\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the\n * children from each duplicate. This is necessary because different outlets can match a single\n * empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes: Array<TreeNode<ActivatedRouteSnapshot>>):\n    Array<TreeNode<ActivatedRouteSnapshot>> {\n  const result: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n  // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n  const mergedNodes: Set<TreeNode<ActivatedRouteSnapshot>> = new Set();\n\n  for (const node of nodes) {\n    if (!hasEmptyPathConfig(node)) {\n      result.push(node);\n      continue;\n    }\n\n    const duplicateEmptyPathNode =\n        result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n    if (duplicateEmptyPathNode !== undefined) {\n      duplicateEmptyPathNode.children.push(...node.children);\n      mergedNodes.add(duplicateEmptyPathNode);\n    } else {\n      result.push(node);\n    }\n  }\n  // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n  // by also merging those children. This is necessary when there are multiple empty path configs in\n  // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n  // of those children can be combined into a single node as well.\n  for (const mergedNode of mergedNodes) {\n    const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n    result.push(new TreeNode(mergedNode.value, mergedChildren));\n  }\n  return result.filter(n => !mergedNodes.has(n));\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  const names: {[k: string]: ActivatedRouteSnapshot} = {};\n  nodes.forEach(n => {\n    const routeWithSameOutletName = names[n.value.outlet];\n    if (routeWithSameOutletName) {\n      const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n      const c = n.value.url.map(s => s.toString()).join('/');\n      throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n    }\n    names[n.value.outlet] = n.value;\n  });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  let s = segmentGroup;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n  }\n  return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n  let s = segmentGroup;\n  let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  }\n  return res - 1;\n}\n\nfunction getData(route: Route): Data {\n  return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n  return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Route[], serializer: (url: UrlTree) => string,\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    relativeLinkResolution: 'legacy'|'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(\n      t => recognizeFn(\n               rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n               paramsInheritanceStrategy, relativeLinkResolution)\n               .pipe(map(targetSnapshot => ({...t, targetSnapshot}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {EMPTY, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, map, mergeMap, takeLast, tap} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, RouterStateSnapshot} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n    if (!canActivateChecks.length) {\n      return of(t);\n    }\n    let canActivateChecksResolved = 0;\n    return from(canActivateChecks)\n        .pipe(\n            concatMap(\n                check => runResolve(\n                    check.route, targetSnapshot!, paramsInheritanceStrategy, moduleInjector)),\n            tap(() => canActivateChecksResolved++),\n            takeLast(1),\n            mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY),\n        );\n  });\n}\n\nfunction runResolve(\n    futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    paramsInheritanceStrategy: 'emptyOnly'|'always', moduleInjector: Injector) {\n  const resolve = futureARS._resolve;\n  return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n      .pipe(map((resolvedData: any) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = {\n          ...futureARS.data,\n          ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve\n        };\n        return null;\n      }));\n}\n\nfunction resolveNode(\n    resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const keys = Object.keys(resolve);\n  if (keys.length === 0) {\n    return of({});\n  }\n  const data: {[k: string]: any} = {};\n  return from(keys).pipe(\n      mergeMap(\n          (key: string) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n                               .pipe(tap((value: any) => {\n                                 data[key] = value;\n                               }))),\n      takeLast(1),\n      mergeMap(() => {\n        // Ensure all resolvers returned values, otherwise don't emit any \"next\" and just complete\n        // the chain which will cancel navigation\n        if (Object.keys(data).length === keys.length) {\n          return of(data);\n        }\n        return EMPTY;\n      }),\n  );\n}\n\nfunction getResolver(\n    injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const resolver = getToken(injectionToken, futureARS, moduleInjector);\n  return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n                            wrapIntoObservable(resolver(futureARS, futureRSS));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {from, MonoTypeOperatorFunction, ObservableInput, of} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n    MonoTypeOperatorFunction<T> {\n  return switchMap(v => {\n    const nextResult = next(v);\n    if (nextResult) {\n      return from(nextResult).pipe(map(() => v));\n    }\n    return of(v);\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n  contexts: Map<string, OutletContext>,\n  componentRef: ComponentRef<any>,\n  route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n  /** Determines if this route (and its subtree) should be detached to be reused later */\n  abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n  /**\n   * Stores the detached route.\n   *\n   * Storing a `null` value should erase the previously stored value.\n   */\n  abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n  /** Determines if this route (and its subtree) should be reattached */\n  abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n  /** Retrieves the previously stored route */\n  abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n  /** Determines if a route should be reused */\n  abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the fragment or query parameters change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nexport abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\n  /**\n   * Whether the given route should detach for later reuse.\n   * Always returns false for `BaseRouteReuseStrategy`.\n   * */\n  shouldDetach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /**\n   * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n   */\n  store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n\n  /** Returns `false`, meaning the route (and its subtree) is never reattached */\n  shouldAttach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /** Returns `null` because this strategy does not store routes for later re-use. */\n  retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null {\n    return null;\n  }\n\n  /**\n   * Determines if a route should be reused.\n   * This strategy returns `true` when the future route config and current route config are\n   * identical.\n   */\n  shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n    return future.routeConfig === curr.routeConfig;\n  }\n}\n\nexport class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectFlags, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {ConnectableObservable, from, Observable, of, Subject} from 'rxjs';\nimport {catchError, map, mergeMap, refCount, tap} from 'rxjs/operators';\n\nimport {LoadChildren, LoadedRouterConfig, Route} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\nimport {standardizeConfig} from './utils/config';\n\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n  constructor(\n      private loader: NgModuleFactoryLoader, private compiler: Compiler,\n      private onLoadStartListener?: (r: Route) => void,\n      private onLoadEndListener?: (r: Route) => void) {}\n\n  load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n    if (route._loader$) {\n      return route._loader$;\n    }\n\n    if (this.onLoadStartListener) {\n      this.onLoadStartListener(route);\n    }\n    const moduleFactory$ = this.loadModuleFactory(route.loadChildren!);\n    const loadRunner = moduleFactory$.pipe(\n        map((factory: NgModuleFactory<any>) => {\n          if (this.onLoadEndListener) {\n            this.onLoadEndListener(route);\n          }\n          const module = factory.create(parentInjector);\n          // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n          // will get stuck in an infinite loop. The child module's Injector will look to\n          // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n          // for it's parent module instead.\n          return new LoadedRouterConfig(\n              flatten(\n                  module.injector.get(ROUTES, undefined, InjectFlags.Self | InjectFlags.Optional))\n                  .map(standardizeConfig),\n              module);\n        }),\n        catchError((err) => {\n          route._loader$ = undefined;\n          throw err;\n        }),\n    );\n    // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n    route._loader$ = new ConnectableObservable(loadRunner, () => new Subject<LoadedRouterConfig>())\n                         .pipe(refCount());\n    return route._loader$;\n  }\n\n  private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n    if (typeof loadChildren === 'string') {\n      return from(this.loader.load(loadChildren));\n    } else {\n      return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n        if (t instanceof NgModuleFactory) {\n          return of(t);\n        } else {\n          return from(this.compiler.compileModuleAsync(t));\n        }\n      }));\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutletContract} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n  outlet: RouterOutletContract|null = null;\n  route: ActivatedRoute|null = null;\n  resolver: ComponentFactoryResolver|null = null;\n  children = new ChildrenOutletContexts();\n  attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n  // contexts for child outlets, by name.\n  private contexts = new Map<string, OutletContext>();\n\n  /** Called when a `RouterOutlet` directive is instantiated */\n  onChildOutletCreated(childName: string, outlet: RouterOutletContract): void {\n    const context = this.getOrCreateContext(childName);\n    context.outlet = outlet;\n    this.contexts.set(childName, context);\n  }\n\n  /**\n   * Called when a `RouterOutlet` directive is destroyed.\n   * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n   * re-created later.\n   */\n  onChildOutletDestroyed(childName: string): void {\n    const context = this.getContext(childName);\n    if (context) {\n      context.outlet = null;\n      context.attachRef = null;\n    }\n  }\n\n  /**\n   * Called when the corresponding route is deactivated during navigation.\n   * Because the component get destroyed, all children outlet are destroyed.\n   */\n  onOutletDeactivated(): Map<string, OutletContext> {\n    const contexts = this.contexts;\n    this.contexts = new Map();\n    return contexts;\n  }\n\n  onOutletReAttached(contexts: Map<string, OutletContext>) {\n    this.contexts = contexts;\n  }\n\n  getOrCreateContext(childName: string): OutletContext {\n    let context = this.getContext(childName);\n\n    if (!context) {\n      context = new OutletContext();\n      this.contexts.set(childName, context);\n    }\n\n    return context;\n  }\n\n  getContext(childName: string): OutletContext|null {\n    return this.contexts.get(childName) || null;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n  /**\n   * Tells the router if this URL should be processed.\n   *\n   * When it returns true, the router will execute the regular navigation.\n   * When it returns false, the router will set the router state to an empty state.\n   * As a result, all the active components will be destroyed.\n   *\n   */\n  abstract shouldProcessUrl(url: UrlTree): boolean;\n\n  /**\n   * Extracts the part of the URL that should be handled by the router.\n   * The rest of the URL will remain untouched.\n   */\n  abstract extract(url: UrlTree): UrlTree;\n\n  /**\n   * Merges the URL fragment with the rest of the URL.\n   */\n  abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n  shouldProcessUrl(url: UrlTree): boolean {\n    return true;\n  }\n  extract(url: UrlTree): UrlTree {\n    return url;\n  }\n  merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree {\n    return newUrlPart;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, PopStateEvent} from '@angular/common';\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, of, Subject, SubscriptionLike} from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, createEmptyState, RouterState, RouterStateSnapshot} from './router_state';\nimport {isNavigationCancelingError, navigationCancelingError, Params} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {containsTree, createEmptyUrlTree, IsActiveMatchOptions, UrlSerializer, UrlTree} from './url_tree';\nimport {standardizeConfig, validateConfig} from './utils/config';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n/**\n * @description\n *\n * Options that modify the `Router` URL.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface UrlCreationOptions {\n  /**\n   * Specifies a root URI to use for relative navigation.\n   *\n   * For example, consider the following route configuration where the parent route\n   * has two children.\n   *\n   * ```\n   * [{\n   *   path: 'parent',\n   *   component: ParentComponent,\n   *   children: [{\n   *     path: 'list',\n   *     component: ListComponent\n   *   },{\n   *     path: 'child',\n   *     component: ChildComponent\n   *   }]\n   * }]\n   * ```\n   *\n   * The following `go()` function navigates to the `list` route by\n   * interpreting the destination URI as relative to the activated `child`  route\n   *\n   * ```\n   *  @Component({...})\n   *  class ChildComponent {\n   *    constructor(private router: Router, private route: ActivatedRoute) {}\n   *\n   *    go() {\n   *      this.router.navigate(['../list'], { relativeTo: this.route });\n   *    }\n   *  }\n   * ```\n   *\n   * A value of `null` or `undefined` indicates that the navigation commands should be applied\n   * relative to the root.\n   */\n  relativeTo?: ActivatedRoute|null;\n\n  /**\n   * Sets query parameters to the URL.\n   *\n   * ```\n   * // Navigate to /results?page=1\n   * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n   * ```\n   */\n  queryParams?: Params|null;\n\n  /**\n   * Sets the hash fragment for the URL.\n   *\n   * ```\n   * // Navigate to /results#top\n   * this.router.navigate(['/results'], { fragment: 'top' });\n   * ```\n   */\n  fragment?: string;\n\n  /**\n   * How to handle query parameters in the router link for the next navigation.\n   * One of:\n   * * `preserve` : Preserve current parameters.\n   * * `merge` : Merge new with current parameters.\n   *\n   * The \"preserve\" option discards any new query params:\n   * ```\n   * // from /view1?page=1 to/view2?page=1\n   * this.router.navigate(['/view2'], { queryParams: { page: 2 },  queryParamsHandling: \"preserve\"\n   * });\n   * ```\n   * The \"merge\" option appends new query params to the params from the current URL:\n   * ```\n   * // from /view1?page=1 to/view2?page=1&otherKey=2\n   * this.router.navigate(['/view2'], { queryParams: { otherKey: 2 },  queryParamsHandling: \"merge\"\n   * });\n   * ```\n   * In case of a key collision between current parameters and those in the `queryParams` object,\n   * the new value is used.\n   *\n   */\n  queryParamsHandling?: QueryParamsHandling|null;\n\n  /**\n   * When true, preserves the URL fragment for the next navigation\n   *\n   * ```\n   * // Preserve fragment from /results#top to /view#top\n   * this.router.navigate(['/view'], { preserveFragment: true });\n   * ```\n   */\n  preserveFragment?: boolean;\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the navigation should be handled.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface NavigationBehaviorOptions {\n  /**\n   * When true, navigates without pushing a new state into history.\n   *\n   * ```\n   * // Navigate silently to /view\n   * this.router.navigate(['/view'], { skipLocationChange: true });\n   * ```\n   */\n  skipLocationChange?: boolean;\n\n  /**\n   * When true, navigates while replacing the current state in history.\n   *\n   * ```\n   * // Navigate to /view\n   * this.router.navigate(['/view'], { replaceUrl: true });\n   * ```\n   */\n  replaceUrl?: boolean;\n\n  /**\n   * Developer-defined state that can be passed to any navigation.\n   * Access this value through the `Navigation.extras` object\n   * returned from the [Router.getCurrentNavigation()\n   * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\n   *\n   * After a navigation completes, the router writes an object containing this\n   * value together with a `navigationId` to `history.state`.\n   * The value is written when `location.go()` or `location.replaceState()`\n   * is called before activating this route.\n   *\n   * Note that `history.state` does not pass an object equality test because\n   * the router adds the `navigationId` on each navigation.\n   *\n   */\n  state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed or interpreted.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n * @see UrlCreationOptions\n * @see NavigationBehaviorOptions\n *\n * @publicApi\n */\nexport interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {}\n\n/**\n * Error handler that is invoked when a navigation error occurs.\n *\n * If the handler returns a value, the navigation Promise is resolved with this value.\n * If the handler throws an exception, the navigation Promise is rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n  throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n    error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n  return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n  [k: string]: any,\n  // TODO(#27607): Remove `navigationId` and `ɵrouterPageId` and move to `ng` or `ɵ` namespace.\n  navigationId: number,\n  // The `ɵ` prefix is there to reduce the chance of colliding with any existing user properties on\n  // the history state.\n  ɵrouterPageId?: number,\n};\n\n/**\n * Information about a navigation operation.\n * Retrieve the most recent navigation object with the\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\n *\n * * *id* : The unique identifier of the current navigation.\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\n * This is the value before the router has parsed or applied redirects to it.\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\n * * *finalUrl* : The extracted URL after redirects have been applied.\n * This URL may not be available immediately, therefore this property can be `undefined`.\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\n * * *trigger* : Identifies how this navigation was triggered.\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n * -- 'popstate'--Triggered by a popstate event.\n * -- 'hashchange'--Triggered by a hashchange event.\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\n * navigation.\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\n * own `previousNavigation`.\n *\n * @publicApi\n */\nexport interface Navigation {\n  /**\n   * The unique identifier of the current navigation.\n   */\n  id: number;\n  /**\n   * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\n   * the value before the router has parsed or applied redirects to it.\n   */\n  initialUrl: string|UrlTree;\n  /**\n   * The initial target URL after being parsed with `UrlSerializer.extract()`.\n   */\n  extractedUrl: UrlTree;\n  /**\n   * The extracted URL after redirects have been applied.\n   * This URL may not be available immediately, therefore this property can be `undefined`.\n   * It is guaranteed to be set after the `RoutesRecognized` event fires.\n   */\n  finalUrl?: UrlTree;\n  /**\n   * Identifies how this navigation was triggered.\n   *\n   * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n   * * 'popstate'--Triggered by a popstate event.\n   * * 'hashchange'--Triggered by a hashchange event.\n   */\n  trigger: 'imperative'|'popstate'|'hashchange';\n  /**\n   * Options that controlled the strategy used for this navigation.\n   * See `NavigationExtras`.\n   */\n  extras: NavigationExtras;\n  /**\n   * The previously successful `Navigation` object. Only one previous navigation\n   * is available, therefore this previous `Navigation` object has a `null` value\n   * for its own `previousNavigation`.\n   */\n  previousNavigation: Navigation|null;\n}\n\nexport type NavigationTransition = {\n  id: number,\n  targetPageId: number,\n  currentUrlTree: UrlTree,\n  currentRawUrl: UrlTree,\n  extractedUrl: UrlTree,\n  urlAfterRedirects: UrlTree,\n  rawUrl: UrlTree,\n  extras: NavigationExtras,\n  resolve: any,\n  reject: any,\n  promise: Promise<boolean>,\n  source: NavigationTrigger,\n  restoredState: RestoredState|null,\n  currentSnapshot: RouterStateSnapshot,\n  targetSnapshot: RouterStateSnapshot|null,\n  currentRouterState: RouterState,\n  targetRouterState: RouterState|null,\n  guards: Checks,\n  guardsResult: boolean|UrlTree|null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}): Observable<void> {\n  return of(null) as any;\n}\n\n/**\n * Information related to a location change, necessary for scheduling follow-up Router navigations.\n */\ntype LocationChangeInfo = {\n  source: 'popstate'|'hashchange',\n  urlTree: UrlTree,\n  state: RestoredState|null,\n  transitionId: number\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nexport const exactMatchOptions: IsActiveMatchOptions = {\n  paths: 'exact',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'exact'\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nexport const subsetMatchOptions: IsActiveMatchOptions = {\n  paths: 'subset',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'subset'\n};\n\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Injectable()\nexport class Router {\n  /**\n   * Represents the activated `UrlTree` that the `Router` is configured to handle (through\n   * `UrlHandlingStrategy`). That is, after we find the route config tree that we're going to\n   * activate, run guards, and are just about to activate the route, we set the currentUrlTree.\n   *\n   * This should match the `browserUrlTree` when a navigation succeeds. If the\n   * `UrlHandlingStrategy.shouldProcessUrl` is `false`, only the `browserUrlTree` is updated.\n   */\n  private currentUrlTree: UrlTree;\n  /**\n   * Meant to represent the entire browser url after a successful navigation. In the life of a\n   * navigation transition:\n   * 1. The rawUrl represents the full URL that's being navigated to\n   * 2. We apply redirects, which might only apply to _part_ of the URL (due to\n   * `UrlHandlingStrategy`).\n   * 3. Right before activation (because we assume activation will succeed), we update the\n   * rawUrlTree to be a combination of the urlAfterRedirects (again, this might only apply to part\n   * of the initial url) and the rawUrl of the transition (which was the original navigation url in\n   * its full form).\n   */\n  private rawUrlTree: UrlTree;\n  /**\n   * Meant to represent the part of the browser url that the `Router` is set up to handle (via the\n   * `UrlHandlingStrategy`). This value is updated immediately after the browser url is updated (or\n   * the browser url update is skipped via `skipLocationChange`). With that, note that\n   * `browserUrlTree` _may not_ reflect the actual browser URL for two reasons:\n   *\n   * 1. `UrlHandlingStrategy` only handles part of the URL\n   * 2. `skipLocationChange` does not update the browser url.\n   *\n   * So to reiterate, `browserUrlTree` only represents the Router's internal understanding of the\n   * current route, either before guards with `urlUpdateStrategy === 'eager'` or right before\n   * activation with `'deferred'`.\n   *\n   * This should match the `currentUrlTree` when the navigation succeeds.\n   */\n  private browserUrlTree: UrlTree;\n  private readonly transitions: BehaviorSubject<NavigationTransition>;\n  private navigations: Observable<NavigationTransition>;\n  private lastSuccessfulNavigation: Navigation|null = null;\n  private currentNavigation: Navigation|null = null;\n  private disposed = false;\n\n  private locationSubscription?: SubscriptionLike;\n  /**\n   * Tracks the previously seen location change from the location subscription so we can compare\n   * the two latest to see if they are duplicates. See setUpLocationChangeListener.\n   */\n  private lastLocationChangeInfo: LocationChangeInfo|null = null;\n  private navigationId: number = 0;\n\n  /**\n   * The id of the currently active page in the router.\n   * Updated to the transition's target id on a successful navigation.\n   *\n   * This is used to track what page the router last activated. When an attempted navigation fails,\n   * the router can then use this to compute how to restore the state back to the previously active\n   * page.\n   */\n  private currentPageId: number = 0;\n  /**\n   * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n   * important for computing the target page id for new navigations because we need to ensure each\n   * page id in the browser history is 1 more than the previous entry.\n   */\n  private get browserPageId(): number|undefined {\n    return (this.location.getState() as RestoredState | null)?.ɵrouterPageId;\n  }\n  private configLoader: RouterConfigLoader;\n  private ngModule: NgModuleRef<any>;\n  private console: Console;\n  private isNgZoneEnabled: boolean = false;\n\n  /**\n   * An event stream for routing events in this NgModule.\n   */\n  public readonly events: Observable<Event> = new Subject<Event>();\n  /**\n   * The current state of routing in this NgModule.\n   */\n  public readonly routerState: RouterState;\n\n  /**\n   * A handler for navigation errors in this NgModule.\n   */\n  errorHandler: ErrorHandler = defaultErrorHandler;\n\n  /**\n   * A handler for errors thrown by `Router.parseUrl(url)`\n   * when `url` contains an invalid character.\n   * The most common case is a `%` sign\n   * that's not encoded and is not part of a percent encoded sequence.\n   */\n  malformedUriErrorHandler:\n      (error: URIError, urlSerializer: UrlSerializer,\n       url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n  /**\n   * True if at least one navigation event has occurred,\n   * false otherwise.\n   */\n  navigated: boolean = false;\n  private lastSuccessfulId: number = -1;\n\n  /**\n   * Hooks that enable you to pause navigation,\n   * either before or after the preactivation phase.\n   * Used by `RouterModule`.\n   *\n   * @internal\n   */\n  hooks: {\n    beforePreactivation: RouterHook,\n    afterPreactivation: RouterHook\n  } = {beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook};\n\n  /**\n   * A strategy for extracting and merging URLs.\n   * Used for AngularJS to Angular migrations.\n   */\n  urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n  /**\n   * A strategy for re-using routes.\n   */\n  routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n  /**\n   * How to handle a navigation request to the current URL. One of:\n   *\n   * - `'ignore'` :  The router ignores the request.\n   * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\n   *\n   * Note that this only configures whether the Route reprocesses the URL and triggers related\n   * action and events like redirects, guards, and resolvers. By default, the router re-uses a\n   * component instance when it re-navigates to the same component type without visiting a different\n   * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload\n   * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`\n   * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.\n   */\n  onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n  /**\n   * How to merge parameters, data, and resolved data from parent to child\n   * routes. One of:\n   *\n   * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n   * for path-less or component-less routes.\n   * - `'always'` : Inherit parent parameters, data, and resolved data\n   * for all child routes.\n   */\n  paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n  /**\n   * Determines when the router updates the browser URL.\n   * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n   * Set to `'eager'` to update the browser URL at the beginning of navigation.\n   * You can choose to update early so that, if navigation fails,\n   * you can show an error message with the URL that failed.\n   */\n  urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * @see `RouterModule`\n   */\n  relativeLinkResolution: 'legacy'|'corrected' = 'corrected';\n\n  /**\n   * Configures how the Router attempts to restore state when a navigation is cancelled.\n   *\n   * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n   * router before the navigation started.\n   *\n   * 'computed' - Will always return to the same state that corresponds to the actual Angular route\n   * when the navigation gets cancelled right after triggering a `popstate` event.\n   *\n   * The default value is `replace`\n   *\n   * @internal\n   */\n  // TODO(atscott): Determine how/when/if to make this public API\n  // This shouldn’t be an option at all but may need to be in order to allow migration without a\n  // breaking change. We need to determine if it should be made into public api (or if we forgo\n  // the option and release as a breaking change bug fix in a major version).\n  canceledNavigationResolution: 'replace'|'computed' = 'replace';\n\n  /**\n   * Creates the router service.\n   */\n  // TODO: vsavkin make internal after the final is out.\n  constructor(\n      private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n      private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n      loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n    const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n    const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.ngModule = injector.get(NgModuleRef);\n    this.console = injector.get(Console);\n    const ngZone = injector.get(NgZone);\n    this.isNgZoneEnabled = ngZone instanceof NgZone && NgZone.isInAngularZone();\n\n    this.resetConfig(config);\n    this.currentUrlTree = createEmptyUrlTree();\n    this.rawUrlTree = this.currentUrlTree;\n    this.browserUrlTree = this.currentUrlTree;\n\n    this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n    this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n    this.transitions = new BehaviorSubject<NavigationTransition>({\n      id: 0,\n      targetPageId: 0,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.currentUrlTree,\n      extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      rawUrl: this.currentUrlTree,\n      extras: {},\n      resolve: null,\n      reject: null,\n      promise: Promise.resolve(true),\n      source: 'imperative',\n      restoredState: null,\n      currentSnapshot: this.routerState.snapshot,\n      targetSnapshot: null,\n      currentRouterState: this.routerState,\n      targetRouterState: null,\n      guards: {canActivateChecks: [], canDeactivateChecks: []},\n      guardsResult: null,\n    });\n    this.navigations = this.setupNavigations(this.transitions);\n\n    this.processNavigations();\n  }\n\n  private setupNavigations(transitions: Observable<NavigationTransition>):\n      Observable<NavigationTransition> {\n    const eventsSubject = (this.events as Subject<Event>);\n    return transitions.pipe(\n               filter(t => t.id !== 0),\n\n               // Extract URL\n               map(t =>\n                       ({...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)} as\n                        NavigationTransition)),\n\n               // Using switchMap so we cancel executing navigations when a new one comes in\n               switchMap(t => {\n                 let completed = false;\n                 let errored = false;\n                 return of(t).pipe(\n                     // Store the Navigation object\n                     tap(t => {\n                       this.currentNavigation = {\n                         id: t.id,\n                         initialUrl: t.currentRawUrl,\n                         extractedUrl: t.extractedUrl,\n                         trigger: t.source,\n                         extras: t.extras,\n                         previousNavigation: this.lastSuccessfulNavigation ?\n                             {...this.lastSuccessfulNavigation, previousNavigation: null} :\n                             null\n                       };\n                     }),\n                     switchMap(t => {\n                       const browserUrlTree = this.browserUrlTree.toString();\n                       const urlTransition = !this.navigated ||\n                           t.extractedUrl.toString() !== browserUrlTree ||\n                           // Navigations which succeed or ones which fail and are cleaned up\n                           // correctly should result in `browserUrlTree` and `currentUrlTree`\n                           // matching. If this is not the case, assume something went wrong and try\n                           // processing the URL again.\n                           browserUrlTree !== this.currentUrlTree.toString();\n                       const processCurrentUrl =\n                           (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n                           this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n\n                       if (processCurrentUrl) {\n                         // If the source of the navigation is from a browser event, the URL is\n                         // already updated. We already need to sync the internal state.\n                         if (isBrowserTriggeredNavigation(t.source)) {\n                           this.browserUrlTree = t.extractedUrl;\n                         }\n                         return of(t).pipe(\n                             // Fire NavigationStart event\n                             switchMap(t => {\n                               const transition = this.transitions.getValue();\n                               eventsSubject.next(new NavigationStart(\n                                   t.id, this.serializeUrl(t.extractedUrl), t.source,\n                                   t.restoredState));\n                               if (transition !== this.transitions.getValue()) {\n                                 return EMPTY;\n                               }\n\n                               // This delay is required to match old behavior that forced\n                               // navigation to always be async\n                               return Promise.resolve(t);\n                             }),\n\n                             // ApplyRedirects\n                             applyRedirects(\n                                 this.ngModule.injector, this.configLoader, this.urlSerializer,\n                                 this.config),\n\n                             // Update the currentNavigation\n                             tap(t => {\n                               this.currentNavigation = {\n                                 ...this.currentNavigation!,\n                                 finalUrl: t.urlAfterRedirects\n                               };\n                             }),\n\n                             // Recognize\n                             recognize(\n                                 this.rootComponentType, this.config,\n                                 (url) => this.serializeUrl(url), this.paramsInheritanceStrategy,\n                                 this.relativeLinkResolution),\n\n                             // Update URL if in `eager` update mode\n                             tap(t => {\n                               if (this.urlUpdateStrategy === 'eager') {\n                                 if (!t.extras.skipLocationChange) {\n                                   this.setBrowserUrl(t.urlAfterRedirects, t);\n                                   // TODO(atscott): The above line is incorrect. It sets the url to\n                                   // only the part that is handled by the router. It should merge\n                                   // that with the rawUrl so the url includes segments not handled\n                                   // by the router:\n                                   //  const rawUrl = this.urlHandlingStrategy.merge(\n                                   //      t.urlAfterRedirects, t.rawUrl);\n                                   //  this.setBrowserUrl(rawUrl, t);\n                                 }\n                                 this.browserUrlTree = t.urlAfterRedirects;\n                               }\n\n                               // Fire RoutesRecognized\n                               const routesRecognized = new RoutesRecognized(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               eventsSubject.next(routesRecognized);\n                             }));\n                       } else {\n                         const processPreviousUrl = urlTransition && this.rawUrlTree &&\n                             this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n                         /* When the current URL shouldn't be processed, but the previous one was,\n                          * we handle this \"error condition\" by navigating to the previously\n                          * successful URL, but leaving the URL intact.*/\n                         if (processPreviousUrl) {\n                           const {id, extractedUrl, source, restoredState, extras} = t;\n                           const navStart = new NavigationStart(\n                               id, this.serializeUrl(extractedUrl), source, restoredState);\n                           eventsSubject.next(navStart);\n                           const targetSnapshot =\n                               createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n                           return of({\n                             ...t,\n                             targetSnapshot,\n                             urlAfterRedirects: extractedUrl,\n                             extras: {...extras, skipLocationChange: false, replaceUrl: false},\n                           });\n                         } else {\n                           /* When neither the current or previous URL can be processed, do nothing\n                            * other than update router's internal reference to the current \"settled\"\n                            * URL. This way the next navigation will be coming from the current URL\n                            * in the browser.\n                            */\n                           this.rawUrlTree = t.rawUrl;\n                           this.browserUrlTree = t.urlAfterRedirects;\n                           t.resolve(null);\n                           return EMPTY;\n                         }\n                       }\n                     }),\n\n                     // Before Preactivation\n                     switchTap(t => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.beforePreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     // --- GUARDS ---\n                     tap(t => {\n                       const guardsStart = new GuardsCheckStart(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                       this.triggerEvent(guardsStart);\n                     }),\n\n                     map(t => ({\n                           ...t,\n                           guards: getAllRouteGuards(\n                               t.targetSnapshot!, t.currentSnapshot, this.rootContexts)\n                         })),\n\n                     checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n                     tap(t => {\n                       if (isUrlTree(t.guardsResult)) {\n                         const error: Error&{url?: UrlTree} = navigationCancelingError(\n                             `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n                         error.url = t.guardsResult;\n                         throw error;\n                       }\n\n                       const guardsEnd = new GuardsCheckEnd(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!,\n                           !!t.guardsResult);\n                       this.triggerEvent(guardsEnd);\n                     }),\n\n                     filter(t => {\n                       if (!t.guardsResult) {\n                         this.restoreHistory(t);\n                         this.cancelNavigationTransition(t, '');\n                         return false;\n                       }\n                       return true;\n                     }),\n\n                     // --- RESOLVE ---\n                     switchTap(t => {\n                       if (t.guards.canActivateChecks.length) {\n                         return of(t).pipe(\n                             tap(t => {\n                               const resolveStart = new ResolveStart(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveStart);\n                             }),\n                             switchMap(t => {\n                               let dataResolved = false;\n                               return of(t).pipe(\n                                   resolveData(\n                                       this.paramsInheritanceStrategy, this.ngModule.injector),\n                                   tap({\n                                     next: () => dataResolved = true,\n                                     complete: () => {\n                                       if (!dataResolved) {\n                                         this.restoreHistory(t);\n                                         this.cancelNavigationTransition(\n                                             t,\n                                             `At least one route resolver didn't emit any value.`);\n                                       }\n                                     }\n                                   }),\n                               );\n                             }),\n                             tap(t => {\n                               const resolveEnd = new ResolveEnd(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveEnd);\n                             }));\n                       }\n                       return undefined;\n                     }),\n\n                     // --- AFTER PREACTIVATION ---\n                     switchTap((t: NavigationTransition) => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.afterPreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     map((t: NavigationTransition) => {\n                       const targetRouterState = createRouterState(\n                           this.routeReuseStrategy, t.targetSnapshot!, t.currentRouterState);\n                       return ({...t, targetRouterState});\n                     }),\n\n                     /* Once here, we are about to activate syncronously. The assumption is this\n                        will succeed, and user code may read from the Router service. Therefore\n                        before activation, we need to update router properties storing the current\n                        URL and the RouterState, as well as updated the browser URL. All this should\n                        happen *before* activating. */\n                     tap((t: NavigationTransition) => {\n                       this.currentUrlTree = t.urlAfterRedirects;\n                       this.rawUrlTree =\n                           this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n\n                       (this as {routerState: RouterState}).routerState = t.targetRouterState!;\n\n                       if (this.urlUpdateStrategy === 'deferred') {\n                         if (!t.extras.skipLocationChange) {\n                           this.setBrowserUrl(this.rawUrlTree, t);\n                         }\n                         this.browserUrlTree = t.urlAfterRedirects;\n                       }\n                     }),\n\n                     activateRoutes(\n                         this.rootContexts, this.routeReuseStrategy,\n                         (evt: Event) => this.triggerEvent(evt)),\n\n                     tap({\n                       next() {\n                         completed = true;\n                       },\n                       complete() {\n                         completed = true;\n                       }\n                     }),\n                     finalize(() => {\n                       /* When the navigation stream finishes either through error or success, we\n                        * set the `completed` or `errored` flag. However, there are some situations\n                        * where we could get here without either of those being set. For instance, a\n                        * redirect during NavigationStart. Therefore, this is a catch-all to make\n                        * sure the NavigationCancel\n                        * event is fired when a navigation gets cancelled but not caught by other\n                        * means. */\n                       if (!completed && !errored) {\n                         const cancelationReason = `Navigation ID ${\n                             t.id} is not equal to the current navigation id ${this.navigationId}`;\n                         if (this.canceledNavigationResolution === 'replace') {\n                           // Must reset to current URL tree here to ensure history.state is set. On\n                           // a fresh page load, if a new navigation comes in before a successful\n                           // navigation completes, there will be nothing in\n                           // history.state.navigationId. This can cause sync problems with\n                           // AngularJS sync code which looks for a value here in order to determine\n                           // whether or not to handle a given popstate event or to leave it to the\n                           // Angular router.\n                           this.restoreHistory(t);\n                           this.cancelNavigationTransition(t, cancelationReason);\n                         } else {\n                           // We cannot trigger a `location.historyGo` if the\n                           // cancellation was due to a new navigation before the previous could\n                           // complete. This is because `location.historyGo` triggers a `popstate`\n                           // which would also trigger another navigation. Instead, treat this as a\n                           // redirect and do not reset the state.\n                           this.cancelNavigationTransition(t, cancelationReason);\n                           // TODO(atscott): The same problem happens here with a fresh page load\n                           // and a new navigation before that completes where we won't set a page\n                           // id.\n                         }\n                       }\n                       // currentNavigation should always be reset to null here. If navigation was\n                       // successful, lastSuccessfulTransition will have already been set. Therefore\n                       // we can safely set currentNavigation to null here.\n                       this.currentNavigation = null;\n                     }),\n                     catchError((e) => {\n                       // TODO(atscott): The NavigationTransition `t` used here does not accurately\n                       // reflect the current state of the whole transition because some operations\n                       // return a new object rather than modifying the one in the outermost\n                       // `switchMap`.\n                       //  The fix can likely be to:\n                       //  1. Rename the outer `t` variable so it's not shadowed all the time and\n                       //  confusing\n                       //  2. Keep reassigning to the outer variable after each stage to ensure it\n                       //  gets updated. Or change the implementations to not return a copy.\n                       // Not changed yet because it affects existing code and would need to be\n                       // tested more thoroughly.\n                       errored = true;\n                       /* This error type is issued during Redirect, and is handled as a\n                        * cancellation rather than an error. */\n                       if (isNavigationCancelingError(e)) {\n                         const redirecting = isUrlTree(e.url);\n                         if (!redirecting) {\n                           // Set property only if we're not redirecting. If we landed on a page and\n                           // redirect to `/` route, the new navigation is going to see the `/`\n                           // isn't a change from the default currentUrlTree and won't navigate.\n                           // This is only applicable with initial navigation, so setting\n                           // `navigated` only when not redirecting resolves this scenario.\n                           this.navigated = true;\n                           this.restoreHistory(t, true);\n                         }\n                         const navCancel = new NavigationCancel(\n                             t.id, this.serializeUrl(t.extractedUrl), e.message);\n                         eventsSubject.next(navCancel);\n\n                         // When redirecting, we need to delay resolving the navigation\n                         // promise and push it to the redirect navigation\n                         if (!redirecting) {\n                           t.resolve(false);\n                         } else {\n                           // setTimeout is required so this navigation finishes with\n                           // the return EMPTY below. If it isn't allowed to finish\n                           // processing, there can be multiple navigations to the same\n                           // URL.\n                           setTimeout(() => {\n                             const mergedTree =\n                                 this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);\n                             const extras = {\n                               skipLocationChange: t.extras.skipLocationChange,\n                               // The URL is already updated at this point if we have 'eager' URL\n                               // updates or if the navigation was triggered by the browser (back\n                               // button, URL bar, etc). We want to replace that item in history if\n                               // the navigation is rejected.\n                               replaceUrl: this.urlUpdateStrategy === 'eager' ||\n                                   isBrowserTriggeredNavigation(t.source)\n                             };\n\n                             this.scheduleNavigation(\n                                 mergedTree, 'imperative', null, extras,\n                                 {resolve: t.resolve, reject: t.reject, promise: t.promise});\n                           }, 0);\n                         }\n\n                         /* All other errors should reset to the router's internal URL reference to\n                          * the pre-error state. */\n                       } else {\n                         this.restoreHistory(t, true);\n                         const navError =\n                             new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n                         eventsSubject.next(navError);\n                         try {\n                           t.resolve(this.errorHandler(e));\n                         } catch (ee) {\n                           t.reject(ee);\n                         }\n                       }\n                       return EMPTY;\n                     }));\n                 // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n               })) as any as Observable<NavigationTransition>;\n  }\n\n  /**\n   * @internal\n   * TODO: this should be removed once the constructor of the router made internal\n   */\n  resetRootComponentType(rootComponentType: Type<any>): void {\n    this.rootComponentType = rootComponentType;\n    // TODO: vsavkin router 4.0 should make the root component set to null\n    // this will simplify the lifecycle of the router.\n    this.routerState.root.component = this.rootComponentType;\n  }\n\n  private getTransition(): NavigationTransition {\n    const transition = this.transitions.value;\n    // TODO(atscott): This comment doesn't make it clear why this value needs to be set. In the case\n    // described below (where we don't handle previous or current url), the `browserUrlTree` is set\n    // to the `urlAfterRedirects` value. However, these values *are already the same* because of the\n    // line below. So it seems that we should be able to remove the line below and the line where\n    // `browserUrlTree` is updated when we aren't handling any part of the navigation url.\n    // Run TGP to confirm that this can be done.\n\n    // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n    // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n    // processing the previous URL.\n    transition.urlAfterRedirects = this.browserUrlTree;\n    return transition;\n  }\n\n  private setTransition(t: Partial<NavigationTransition>): void {\n    this.transitions.next({...this.getTransition(), ...t});\n  }\n\n  /**\n   * Sets up the location change listener and performs the initial navigation.\n   */\n  initialNavigation(): void {\n    this.setUpLocationChangeListener();\n    if (this.navigationId === 0) {\n      this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n    }\n  }\n\n  /**\n   * Sets up the location change listener. This listener detects navigations triggered from outside\n   * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n   * navigation so that the correct events, guards, etc. are triggered.\n   */\n  setUpLocationChangeListener(): void {\n    // Don't need to use Zone.wrap any more, because zone.js\n    // already patch onPopState, so location change callback will\n    // run into ngZone\n    if (!this.locationSubscription) {\n      this.locationSubscription = this.location.subscribe(event => {\n        const currentChange = this.extractLocationChangeInfoFromEvent(event);\n        // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n        // hybrid apps.\n        if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) {\n          setTimeout(() => {\n            const {source, state, urlTree} = currentChange;\n            const extras: NavigationExtras = {replaceUrl: true};\n            if (state) {\n              const stateCopy = {...state} as Partial<RestoredState>;\n              delete stateCopy.navigationId;\n              delete stateCopy.ɵrouterPageId;\n              if (Object.keys(stateCopy).length !== 0) {\n                extras.state = stateCopy;\n              }\n            }\n            this.scheduleNavigation(urlTree, source, state, extras);\n          }, 0);\n        }\n        this.lastLocationChangeInfo = currentChange;\n      });\n    }\n  }\n\n  /** Extracts router-related information from a `PopStateEvent`. */\n  private extractLocationChangeInfoFromEvent(change: PopStateEvent): LocationChangeInfo {\n    return {\n      source: change['type'] === 'popstate' ? 'popstate' : 'hashchange',\n      urlTree: this.parseUrl(change['url']!),\n      // Navigations coming from Angular router have a navigationId state\n      // property. When this exists, restore the state.\n      state: change.state?.navigationId ? change.state : null,\n      transitionId: this.getTransition().id\n    } as const;\n  }\n\n  /**\n   * Determines whether two events triggered by the Location subscription are due to the same\n   * navigation. The location subscription can fire two events (popstate and hashchange) for a\n   * single navigation. The second one should be ignored, that is, we should not schedule another\n   * navigation in the Router.\n   */\n  private shouldScheduleNavigation(previous: LocationChangeInfo|null, current: LocationChangeInfo):\n      boolean {\n    if (!previous) return true;\n\n    const sameDestination = current.urlTree.toString() === previous.urlTree.toString();\n    const eventsOccurredAtSameTime = current.transitionId === previous.transitionId;\n    if (!eventsOccurredAtSameTime || !sameDestination) {\n      return true;\n    }\n\n    if ((current.source === 'hashchange' && previous.source === 'popstate') ||\n        (current.source === 'popstate' && previous.source === 'hashchange')) {\n      return false;\n    }\n\n    return true;\n  }\n\n  /** The current URL. */\n  get url(): string {\n    return this.serializeUrl(this.currentUrlTree);\n  }\n\n  /**\n   * Returns the current `Navigation` object when the router is navigating,\n   * and `null` when idle.\n   */\n  getCurrentNavigation(): Navigation|null {\n    return this.currentNavigation;\n  }\n\n  /** @internal */\n  triggerEvent(event: Event): void {\n    (this.events as Subject<Event>).next(event);\n  }\n\n  /**\n   * Resets the route configuration used for navigation and generating links.\n   *\n   * @param config The route array for the new configuration.\n   *\n   * @usageNotes\n   *\n   * ```\n   * router.resetConfig([\n   *  { path: 'team/:id', component: TeamCmp, children: [\n   *    { path: 'simple', component: SimpleCmp },\n   *    { path: 'user/:name', component: UserCmp }\n   *  ]}\n   * ]);\n   * ```\n   */\n  resetConfig(config: Routes): void {\n    validateConfig(config);\n    this.config = config.map(standardizeConfig);\n    this.navigated = false;\n    this.lastSuccessfulId = -1;\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.dispose();\n  }\n\n  /** Disposes of the router. */\n  dispose(): void {\n    this.transitions.complete();\n    if (this.locationSubscription) {\n      this.locationSubscription.unsubscribe();\n      this.locationSubscription = undefined;\n    }\n    this.disposed = true;\n  }\n\n  /**\n   * Appends URL segments to the current URL tree to create a new URL tree.\n   *\n   * @param commands An array of URL fragments with which to construct the new URL tree.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\n   * property of the options object, if supplied.\n   * @param navigationExtras Options that control the navigation strategy.\n   * @returns The new URL tree.\n   *\n   * @usageNotes\n   *\n   * ```\n   * // create /team/33/user/11\n   * router.createUrlTree(['/team', 33, 'user', 11]);\n   *\n   * // create /team/33;expand=true/user/11\n   * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n   *\n   * // you can collapse static segments like this (this works only with the first passed-in value):\n   * router.createUrlTree(['/team/33/user', userId]);\n   *\n   * // If the first segment can contain slashes, and you do not want the router to split it,\n   * // you can do the following:\n   * router.createUrlTree([{segmentPath: '/one/two'}]);\n   *\n   * // create /team/33/(user/11//right:chat)\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n   *\n   * // remove the right secondary node\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n   *\n   * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n   *\n   * // navigate to /team/33/user/11/details\n   * router.createUrlTree(['details'], {relativeTo: route});\n   *\n   * // navigate to /team/33/user/22\n   * router.createUrlTree(['../22'], {relativeTo: route});\n   *\n   * // navigate to /team/44/user/22\n   * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n   *\n   * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n   * tree should be created relative to the root.\n   * ```\n   */\n  createUrlTree(commands: any[], navigationExtras: UrlCreationOptions = {}): UrlTree {\n    const {relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment} =\n        navigationExtras;\n    const a = relativeTo || this.routerState.root;\n    const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n    let q: Params|null = null;\n    switch (queryParamsHandling) {\n      case 'merge':\n        q = {...this.currentUrlTree.queryParams, ...queryParams};\n        break;\n      case 'preserve':\n        q = this.currentUrlTree.queryParams;\n        break;\n      default:\n        q = queryParams || null;\n    }\n    if (q !== null) {\n      q = this.removeEmptyProps(q);\n    }\n    return createUrlTree(a, this.currentUrlTree, commands, q, f ?? null);\n  }\n\n  /**\n   * Navigates to a view using an absolute route path.\n   *\n   * @param url An absolute path for a defined route. The function does not apply any delta to the\n   *     current URL.\n   * @param extras An object containing properties that modify the navigation strategy.\n   *\n   * @returns A Promise that resolves to 'true' when navigation succeeds,\n   * to 'false' when navigation fails, or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to an absolute path.\n   *\n   * ```\n   * router.navigateByUrl(\"/team/33/user/11\");\n   *\n   * // Navigate without updating the URL\n   * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigateByUrl(url: string|UrlTree, extras: NavigationBehaviorOptions = {\n    skipLocationChange: false\n  }): Promise<boolean> {\n    if (typeof ngDevMode === 'undefined' ||\n        ngDevMode && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n      this.console.warn(\n          `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n    }\n\n    const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n    const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n    return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n  }\n\n  /**\n   * Navigate based on the provided array of commands and a starting point.\n   * If no starting route is provided, the navigation is absolute.\n   *\n   * @param commands An array of URL fragments with which to construct the target URL.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\n   * of the options object, if supplied.\n   * @param extras An options object that determines how the URL should be constructed or\n   *     interpreted.\n   *\n   * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\n   *     fails,\n   * or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to a dynamic route path relative to the current URL.\n   *\n   * ```\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n   *\n   * // Navigate without updating the URL, overriding the default behavior\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    validateCommands(commands);\n    return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n  }\n\n  /** Serializes a `UrlTree` into a string */\n  serializeUrl(url: UrlTree): string {\n    return this.urlSerializer.serialize(url);\n  }\n\n  /** Parses a string into a `UrlTree` */\n  parseUrl(url: string): UrlTree {\n    let urlTree: UrlTree;\n    try {\n      urlTree = this.urlSerializer.parse(url);\n    } catch (e) {\n      urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n    }\n    return urlTree;\n  }\n\n  /**\n   * Returns whether the url is activated.\n   *\n   * @deprecated\n   * Use `IsActiveMatchOptions` instead.\n   *\n   * - The equivalent `IsActiveMatchOptions` for `true` is\n   * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.\n   * - The equivalent for `false` is\n   * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.\n   */\n  isActive(url: string|UrlTree, exact: boolean): boolean;\n  /**\n   * Returns whether the url is activated.\n   */\n  isActive(url: string|UrlTree, matchOptions: IsActiveMatchOptions): boolean;\n  /** @internal */\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean;\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean {\n    let options: IsActiveMatchOptions;\n    if (matchOptions === true) {\n      options = {...exactMatchOptions};\n    } else if (matchOptions === false) {\n      options = {...subsetMatchOptions};\n    } else {\n      options = matchOptions;\n    }\n    if (isUrlTree(url)) {\n      return containsTree(this.currentUrlTree, url, options);\n    }\n\n    const urlTree = this.parseUrl(url);\n    return containsTree(this.currentUrlTree, urlTree, options);\n  }\n\n  private removeEmptyProps(params: Params): Params {\n    return Object.keys(params).reduce((result: Params, key: string) => {\n      const value: any = params[key];\n      if (value !== null && value !== undefined) {\n        result[key] = value;\n      }\n      return result;\n    }, {});\n  }\n\n  private processNavigations(): void {\n    this.navigations.subscribe(\n        t => {\n          this.navigated = true;\n          this.lastSuccessfulId = t.id;\n          this.currentPageId = t.targetPageId;\n          (this.events as Subject<Event>)\n              .next(new NavigationEnd(\n                  t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n          this.lastSuccessfulNavigation = this.currentNavigation;\n          t.resolve(true);\n        },\n        e => {\n          this.console.warn(`Unhandled Navigation Error: ${e}`);\n        });\n  }\n\n  private scheduleNavigation(\n      rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n      extras: NavigationExtras,\n      priorPromise?: {resolve: any, reject: any, promise: Promise<boolean>}): Promise<boolean> {\n    if (this.disposed) {\n      return Promise.resolve(false);\n    }\n\n    // * Imperative navigations (router.navigate) might trigger additional navigations to the same\n    //   URL via a popstate event and the locationChangeListener. We should skip these duplicate\n    //   navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router\n    //   states.\n    // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If\n    //   the user follows that with a navigation using the back/forward button or manual URL change,\n    //   the destination may be the same as the previous imperative attempt. We should not skip\n    //   these navigations because it's a separate case from the one above -- it's not a duplicate\n    //   navigation.\n    const lastNavigation = this.getTransition();\n    // We don't want to skip duplicate successful navs if they're imperative because\n    // onSameUrlNavigation could be 'reload' (so the duplicate is intended).\n    const browserNavPrecededByRouterNav = isBrowserTriggeredNavigation(source) && lastNavigation &&\n        !isBrowserTriggeredNavigation(lastNavigation.source);\n    const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id;\n    // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison.\n    // However, if it failed, we should compare to the final result (urlAfterRedirects).\n    const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ?\n        lastNavigation.rawUrl :\n        lastNavigation.urlAfterRedirects;\n    const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();\n    if (browserNavPrecededByRouterNav && duplicateNav) {\n      return Promise.resolve(true);  // return value is not used\n    }\n\n    let resolve: any;\n    let reject: any;\n    let promise: Promise<boolean>;\n    if (priorPromise) {\n      resolve = priorPromise.resolve;\n      reject = priorPromise.reject;\n      promise = priorPromise.promise;\n\n    } else {\n      promise = new Promise<boolean>((res, rej) => {\n        resolve = res;\n        reject = rej;\n      });\n    }\n\n    const id = ++this.navigationId;\n    let targetPageId: number;\n    if (this.canceledNavigationResolution === 'computed') {\n      const isInitialPage = this.currentPageId === 0;\n      if (isInitialPage) {\n        restoredState = this.location.getState() as RestoredState | null;\n      }\n      // If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of\n      // `ɵrouterPageId`. This is the case for something like a page refresh where we assign the\n      // target id to the previously set value for that page.\n      if (restoredState && restoredState.ɵrouterPageId) {\n        targetPageId = restoredState.ɵrouterPageId;\n      } else {\n        // If we're replacing the URL or doing a silent navigation, we do not want to increment the\n        // page id because we aren't pushing a new entry to history.\n        if (extras.replaceUrl || extras.skipLocationChange) {\n          targetPageId = this.browserPageId ?? 0;\n        } else {\n          targetPageId = (this.browserPageId ?? 0) + 1;\n        }\n      }\n    } else {\n      // This is unused when `canceledNavigationResolution` is not computed.\n      targetPageId = 0;\n    }\n\n    this.setTransition({\n      id,\n      targetPageId,\n      source,\n      restoredState,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.rawUrlTree,\n      rawUrl,\n      extras,\n      resolve,\n      reject,\n      promise,\n      currentSnapshot: this.routerState.snapshot,\n      currentRouterState: this.routerState\n    });\n\n    // Make sure that the error is propagated even though `processNavigations` catch\n    // handler does not rethrow\n    return promise.catch((e: any) => {\n      return Promise.reject(e);\n    });\n  }\n\n  private setBrowserUrl(url: UrlTree, t: NavigationTransition) {\n    const path = this.urlSerializer.serialize(url);\n    const state = {...t.extras.state, ...this.generateNgRouterState(t.id, t.targetPageId)};\n    if (this.location.isCurrentPathEqualTo(path) || !!t.extras.replaceUrl) {\n      this.location.replaceState(path, '', state);\n    } else {\n      this.location.go(path, '', state);\n    }\n  }\n\n  /**\n   * Performs the necessary rollback action to restore the browser URL to the\n   * state before the transition.\n   */\n  private restoreHistory(t: NavigationTransition, restoringFromCaughtError = false) {\n    if (this.canceledNavigationResolution === 'computed') {\n      const targetPagePosition = this.currentPageId - t.targetPageId;\n      // The navigator change the location before triggered the browser event,\n      // so we need to go back to the current url if the navigation is canceled.\n      // Also, when navigation gets cancelled while using url update strategy eager, then we need to\n      // go back. Because, when `urlUpdateSrategy` is `eager`; `setBrowserUrl` method is called\n      // before any verification.\n      const browserUrlUpdateOccurred =\n          (t.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n           this.currentUrlTree === this.currentNavigation?.finalUrl);\n      if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n        this.location.historyGo(targetPagePosition);\n      } else if (\n          this.currentUrlTree === this.currentNavigation?.finalUrl && targetPagePosition === 0) {\n        // We got to the activation stage (where currentUrlTree is set to the navigation's\n        // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n        // We still need to reset the router state back to what it was when the navigation started.\n        this.resetState(t);\n        // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.\n        // Investigate if this can be done by running TGP.\n        this.browserUrlTree = t.currentUrlTree;\n        this.resetUrlToCurrentUrlTree();\n      } else {\n        // The browser URL and router state was not updated before the navigation cancelled so\n        // there's no restoration needed.\n      }\n    } else if (this.canceledNavigationResolution === 'replace') {\n      // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n      // for `deferred` navigations that haven't change the internal state yet because guards\n      // reject. For 'eager' navigations, it seems like we also really should reset the state\n      // because the navigation was cancelled. Investigate if this can be done by running TGP.\n      if (restoringFromCaughtError) {\n        this.resetState(t);\n      }\n      this.resetUrlToCurrentUrlTree();\n    }\n  }\n\n  private resetState(t: NavigationTransition): void {\n    (this as {routerState: RouterState}).routerState = t.currentRouterState;\n    this.currentUrlTree = t.currentUrlTree;\n    this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n  }\n\n  private resetUrlToCurrentUrlTree(): void {\n    this.location.replaceState(\n        this.urlSerializer.serialize(this.rawUrlTree), '',\n        this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n  }\n\n  private cancelNavigationTransition(t: NavigationTransition, reason: string) {\n    const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), reason);\n    this.triggerEvent(navCancel);\n    t.resolve(false);\n  }\n\n  private generateNgRouterState(navigationId: number, routerPageId?: number) {\n    if (this.canceledNavigationResolution === 'computed') {\n      return {navigationId, ɵrouterPageId: routerPageId};\n    }\n    return {navigationId};\n  }\n}\n\nfunction validateCommands(commands: string[]): void {\n  for (let i = 0; i < commands.length; i++) {\n    const cmd = commands[i];\n    if (cmd == null) {\n      throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n    }\n  }\n}\n\nfunction isBrowserTriggeredNavigation(source: 'imperative'|'popstate'|'hashchange') {\n  return source !== 'imperative';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {Params} from '../shared';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segements.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink implements OnChanges {\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private preserve!: boolean;\n\n  /** @internal */\n  onChanges = new Subject<RouterLink>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n    if (tabIndex == null) {\n      renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges) {\n    // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n    // to the RouterLinks it's tracking.\n    this.onChanges.next(this);\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  @HostListener('click')\n  onClick(): boolean {\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state,\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return true;\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @HostBinding('attr.target') @Input() target!: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private subscription: Subscription;\n  // TODO(issue/24571): remove '!'.\n  private preserve!: boolean;\n\n  // the url displayed on the anchor element.\n  // TODO(issue/24571): remove '!'.\n  @HostBinding() href!: string;\n\n  /** @internal */\n  onChanges = new Subject<RouterLinkWithHref>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      private locationStrategy: LocationStrategy) {\n    this.subscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.updateTargetUrlAndHref();\n      }\n    });\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): any {\n    this.updateTargetUrlAndHref();\n    this.onChanges.next(this);\n  }\n  /** @nodoc */\n  ngOnDestroy(): any {\n    this.subscription.unsubscribe();\n  }\n\n  /** @nodoc */\n  @HostListener(\n      'click',\n      ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'])\n  onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean):\n      boolean {\n    if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n      return true;\n    }\n\n    if (typeof this.target === 'string' && this.target != '_self') {\n      return true;\n    }\n\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return false;\n  }\n\n  private updateTargetUrlAndHref(): void {\n    this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\nfunction attrBoolValue(s: any): boolean {\n  return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, Optional, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {from, of, Subscription} from 'rxjs';\nimport {mergeAll} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {IsActiveMatchOptions} from '../url_tree';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLinkActive]',\n  exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n  @ContentChildren(RouterLink, {descendants: true}) links!: QueryList<RouterLink>;\n  @ContentChildren(RouterLinkWithHref, {descendants: true})\n  linksWithHrefs!: QueryList<RouterLinkWithHref>;\n\n  private classes: string[] = [];\n  private routerEventsSubscription: Subscription;\n  private linkInputChangesSubscription?: Subscription;\n  public readonly isActive: boolean = false;\n\n  /**\n   * Options to configure how to determine if the router link is active.\n   *\n   * These options are passed to the `Router.isActive()` function.\n   *\n   * @see Router.isActive\n   */\n  @Input() routerLinkActiveOptions: {exact: boolean}|IsActiveMatchOptions = {exact: false};\n\n\n  constructor(\n      private router: Router, private element: ElementRef, private renderer: Renderer2,\n      private readonly cdr: ChangeDetectorRef, @Optional() private link?: RouterLink,\n      @Optional() private linkWithHref?: RouterLinkWithHref) {\n    this.routerEventsSubscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.update();\n      }\n    });\n  }\n\n  /** @nodoc */\n  ngAfterContentInit(): void {\n    // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n    of(this.links.changes, this.linksWithHrefs.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n      this.update();\n      this.subscribeToEachLinkOnChanges();\n    });\n  }\n\n  private subscribeToEachLinkOnChanges() {\n    this.linkInputChangesSubscription?.unsubscribe();\n    const allLinkChanges =\n        [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref]\n            .filter((link): link is RouterLink|RouterLinkWithHref => !!link)\n            .map(link => link.onChanges);\n    this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n      if (this.isActive !== this.isLinkActive(this.router)(link)) {\n        this.update();\n      }\n    });\n  }\n\n  @Input()\n  set routerLinkActive(data: string[]|string) {\n    const classes = Array.isArray(data) ? data : data.split(' ');\n    this.classes = classes.filter(c => !!c);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    this.update();\n  }\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.routerEventsSubscription.unsubscribe();\n    this.linkInputChangesSubscription?.unsubscribe();\n  }\n\n  private update(): void {\n    if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n    Promise.resolve().then(() => {\n      const hasActiveLinks = this.hasActiveLinks();\n      if (this.isActive !== hasActiveLinks) {\n        (this as any).isActive = hasActiveLinks;\n        this.cdr.markForCheck();\n        this.classes.forEach((c) => {\n          if (hasActiveLinks) {\n            this.renderer.addClass(this.element.nativeElement, c);\n          } else {\n            this.renderer.removeClass(this.element.nativeElement, c);\n          }\n        });\n      }\n    });\n  }\n\n  private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n    const options: boolean|IsActiveMatchOptions =\n        isActiveMatchOptions(this.routerLinkActiveOptions) ?\n        this.routerLinkActiveOptions :\n        // While the types should disallow `undefined` here, it's possible without strict inputs\n        (this.routerLinkActiveOptions.exact || false);\n    return (link: RouterLink|RouterLinkWithHref) => router.isActive(link.urlTree, options);\n  }\n\n  private hasActiveLinks(): boolean {\n    const isActiveCheckFn = this.isLinkActive(this.router);\n    return this.link && isActiveCheckFn(this.link) ||\n        this.linkWithHref && isActiveCheckFn(this.linkWithHref) ||\n        this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);\n  }\n}\n\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options: {exact: boolean}|\n                              IsActiveMatchOptions): options is IsActiveMatchOptions {\n  return !!(options as IsActiveMatchOptions).paths;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef,} from '@angular/core';\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * An interface that defines the contract for developing a component outlet for the `Router`.\n *\n * An outlet acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * A router outlet should register itself with the `Router` via\n * `ChildrenOutletContexts#onChildOutletCreated` and unregister with\n * `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,\n * it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.\n *\n * @see `ChildrenOutletContexts`\n * @publicApi\n */\nexport interface RouterOutletContract {\n  /**\n   * Whether the given outlet is activated.\n   *\n   * An outlet is considered \"activated\" if it has an active component.\n   */\n  isActivated: boolean;\n\n  /** The instance of the activated component or `null` if the outlet is not activated. */\n  component: Object|null;\n\n  /**\n   * The `Data` of the `ActivatedRoute` snapshot.\n   */\n  activatedRouteData: Data;\n\n  /**\n   * The `ActivatedRoute` for the outlet or `null` if the outlet is not activated.\n   */\n  activatedRoute: ActivatedRoute|null;\n\n  /**\n   * Called by the `Router` when the outlet should activate (create a component).\n   */\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null): void;\n\n  /**\n   * A request to destroy the currently activated component.\n   *\n   * When a `RouteReuseStrategy` indicates that an `ActivatedRoute` should be removed but stored for\n   * later re-use rather than destroyed, the `Router` will call `detach` instead.\n   */\n  deactivate(): void;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree.\n   *\n   * This is similar to `deactivate`, but the activated component should _not_ be destroyed.\n   * Instead, it is returned so that it can be reattached later via the `attach` method.\n   */\n  detach(): ComponentRef<unknown>;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree.\n   */\n  attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;\n\n  /**\n   * Emits an activate event when a new component is instantiated\n   **/\n  activateEvents?: EventEmitter<unknown>;\n\n  /**\n   * Emits a deactivate event when a component is destroyed.\n   */\n  deactivateEvents?: EventEmitter<unknown>;\n}\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {\n  private activated: ComponentRef<any>|null = null;\n  private _activatedRoute: ActivatedRoute|null = null;\n  private name: string;\n\n  @Output('activate') activateEvents = new EventEmitter<any>();\n  @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n  constructor(\n      private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n      private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n      private changeDetector: ChangeDetectorRef) {\n    this.name = name || PRIMARY_OUTLET;\n    parentContexts.onChildOutletCreated(this.name, this);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.parentContexts.onChildOutletDestroyed(this.name);\n  }\n\n  /** @nodoc */\n  ngOnInit(): void {\n    if (!this.activated) {\n      // If the outlet was not instantiated at the time the route got activated we need to populate\n      // the outlet when it is initialized (ie inside a NgIf)\n      const context = this.parentContexts.getContext(this.name);\n      if (context && context.route) {\n        if (context.attachRef) {\n          // `attachRef` is populated when there is an existing component to mount\n          this.attach(context.attachRef, context.route);\n        } else {\n          // otherwise the component defined in the configuration is created\n          this.activateWith(context.route, context.resolver || null);\n        }\n      }\n    }\n  }\n\n  get isActivated(): boolean {\n    return !!this.activated;\n  }\n\n  /**\n   * @returns The currently activated component instance.\n   * @throws An error if the outlet is not activated.\n   */\n  get component(): Object {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this.activated.instance;\n  }\n\n  get activatedRoute(): ActivatedRoute {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this._activatedRoute as ActivatedRoute;\n  }\n\n  get activatedRouteData(): Data {\n    if (this._activatedRoute) {\n      return this._activatedRoute.snapshot.data;\n    }\n    return {};\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree\n   */\n  detach(): ComponentRef<any> {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    this.location.detach();\n    const cmp = this.activated;\n    this.activated = null;\n    this._activatedRoute = null;\n    return cmp;\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n   */\n  attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n    this.activated = ref;\n    this._activatedRoute = activatedRoute;\n    this.location.insert(ref.hostView);\n  }\n\n  deactivate(): void {\n    if (this.activated) {\n      const c = this.component;\n      this.activated.destroy();\n      this.activated = null;\n      this._activatedRoute = null;\n      this.deactivateEvents.emit(c);\n    }\n  }\n\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n    if (this.isActivated) {\n      throw new Error('Cannot activate an already activated outlet');\n    }\n    this._activatedRoute = activatedRoute;\n    const snapshot = activatedRoute._futureSnapshot;\n    const component = <any>snapshot.routeConfig!.component;\n    resolver = resolver || this.resolver;\n    const factory = resolver.resolveComponentFactory(component);\n    const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n    const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n    this.activated = this.location.createComponent(factory, this.location.length, injector);\n    // Calling `markForCheck` to make sure we will run the change detection when the\n    // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n    this.changeDetector.markForCheck();\n    this.activateEvents.emit(this.activated.instance);\n  }\n}\n\nclass OutletInjector implements Injector {\n  constructor(\n      private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n      private parent: Injector) {}\n\n  get(token: any, notFoundValue?: any): any {\n    if (token === ActivatedRoute) {\n      return this.route;\n    }\n\n    if (token === ChildrenOutletContexts) {\n      return this.childContexts;\n    }\n\n    return this.parent.get(token, notFoundValue);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {from, Observable, of, Subscription} from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n  abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return fn().pipe(catchError(() => of(null)));\n  }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return of(null);\n  }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n  private loader: RouterConfigLoader;\n  private subscription?: Subscription;\n\n  constructor(\n      private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n      private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n    const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n    const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n  }\n\n  setUpPreloading(): void {\n    this.subscription =\n        this.router.events\n            .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n            .subscribe(() => {});\n  }\n\n  preload(): Observable<any> {\n    const ngModule = this.injector.get(NgModuleRef);\n    return this.processRoutes(ngModule, this.router.config);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this.subscription) {\n      this.subscription.unsubscribe();\n    }\n  }\n\n  private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n    const res: Observable<any>[] = [];\n    for (const route of routes) {\n      // we already have the config loaded, just recurse\n      if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n        const childConfig = route._loadedConfig;\n        res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n        // no config loaded, fetch the config\n      } else if (route.loadChildren && !route.canLoad) {\n        res.push(this.preloadConfig(ngModule, route));\n\n        // recurse into children\n      } else if (route.children) {\n        res.push(this.processRoutes(ngModule, route.children));\n      }\n    }\n    return from(res).pipe(mergeAll(), map((_) => void 0));\n  }\n\n  private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n    return this.preloadingStrategy.preload(route, () => {\n      const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                            this.loader.load(ngModule.injector, route);\n      return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n        route._loadedConfig = config;\n        return this.processRoutes(config.module, config.routes);\n      }));\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {Injectable, OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\n@Injectable()\nexport class RouterScroller implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  private routerEventsSubscription!: Unsubscribable;\n  // TODO(issue/24571): remove '!'.\n  private scrollEventsSubscription!: Unsubscribable;\n\n  private lastId = 0;\n  private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n  private restoredId = 0;\n  private store: {[key: string]: [number, number]} = {};\n\n  constructor(\n      private router: Router,\n      /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n        scrollPositionRestoration?: 'disabled'|'enabled'|'top',\n        anchorScrolling?: 'disabled'|'enabled'\n      } = {}) {\n    // Default both options to 'disabled'\n    options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n    options.anchorScrolling = options.anchorScrolling || 'disabled';\n  }\n\n  init(): void {\n    // we want to disable the automatic scrolling because having two places\n    // responsible for scrolling results race conditions, especially given\n    // that browser don't implement this behavior consistently\n    if (this.options.scrollPositionRestoration !== 'disabled') {\n      this.viewportScroller.setHistoryScrollRestoration('manual');\n    }\n    this.routerEventsSubscription = this.createScrollEvents();\n    this.scrollEventsSubscription = this.consumeScrollEvents();\n  }\n\n  private createScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (e instanceof NavigationStart) {\n        // store the scroll position of the current stable navigations.\n        this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n        this.lastSource = e.navigationTrigger;\n        this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n      } else if (e instanceof NavigationEnd) {\n        this.lastId = e.id;\n        this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n      }\n    });\n  }\n\n  private consumeScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (!(e instanceof Scroll)) return;\n      // a popstate event. The pop state event will always ignore anchor scrolling.\n      if (e.position) {\n        if (this.options.scrollPositionRestoration === 'top') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        } else if (this.options.scrollPositionRestoration === 'enabled') {\n          this.viewportScroller.scrollToPosition(e.position);\n        }\n        // imperative navigation \"forward\"\n      } else {\n        if (e.anchor && this.options.anchorScrolling === 'enabled') {\n          this.viewportScroller.scrollToAnchor(e.anchor);\n        } else if (this.options.scrollPositionRestoration !== 'disabled') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        }\n      }\n    });\n  }\n\n  private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n    this.router.triggerEvent(new Scroll(\n        routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n  }\n\n  /** @nodoc */\n  ngOnDestroy() {\n    if (this.routerEventsSubscription) {\n      this.routerEventsSubscription.unsubscribe();\n    }\n    if (this.scrollEventsSubscription) {\n      this.scrollEventsSubscription.unsubscribe();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, Location, LOCATION_INITIALIZED, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, OnDestroy, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {of, Subject} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {Event} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES =\n    [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n  Location,\n  {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n  {\n    provide: Router,\n    useFactory: setupRouter,\n    deps: [\n      UrlSerializer, ChildrenOutletContexts, Location, Injector, NgModuleFactoryLoader, Compiler,\n      ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n      [RouteReuseStrategy, new Optional()]\n    ]\n  },\n  ChildrenOutletContexts,\n  {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n  {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n  RouterPreloader,\n  NoPreloading,\n  PreloadAllModules,\n  {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n  return new NgProbeToken('Router', Router);\n}\n\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/router) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\n@NgModule({\n  declarations: ROUTER_DIRECTIVES,\n  exports: ROUTER_DIRECTIVES,\n  entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n  // Note: We are injecting the Router so it gets created eagerly...\n  constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n  /**\n   * Creates and configures a module with all the router providers and directives.\n   * Optionally sets up an application listener to perform an initial navigation.\n   *\n   * When registering the NgModule at the root, import as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forRoot(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the application.\n   * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n   * @return The new `NgModule`.\n   *\n   */\n  static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [\n        ROUTER_PROVIDERS,\n        provideRoutes(routes),\n        {\n          provide: ROUTER_FORROOT_GUARD,\n          useFactory: provideForRootGuard,\n          deps: [[Router, new Optional(), new SkipSelf()]]\n        },\n        {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n        {\n          provide: LocationStrategy,\n          useFactory: provideLocationStrategy,\n          deps:\n              [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]\n        },\n        {\n          provide: RouterScroller,\n          useFactory: createRouterScroller,\n          deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n        },\n        {\n          provide: PreloadingStrategy,\n          useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n                                                             NoPreloading\n        },\n        {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n        provideRouterInitializer(),\n      ],\n    };\n  }\n\n  /**\n   * Creates a module with all the router directives and a provider registering routes,\n   * without creating a new Router service.\n   * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forChild(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n   * @return The new NgModule.\n   *\n   */\n  static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n    return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n  }\n}\n\nexport function createRouterScroller(\n    router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n  if (config.scrollOffset) {\n    viewportScroller.setOffset(config.scrollOffset);\n  }\n  return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n    platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n  return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n                           new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n  if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n    throw new Error(\n        `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n  }\n  return 'guarded';\n}\n\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n *   imports: [RouterModule.forChild(ROUTES)],\n *   providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n  return [\n    {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n    {provide: ROUTES, multi: true, useValue: routes},\n  ];\n}\n\n/**\n * Allowed values in an `ExtraOptions` object that configure\n * when the router performs the initial navigation operation.\n *\n * * 'enabledNonBlocking' - (default) The initial navigation starts after the\n * root component has been created. The bootstrap is not blocked on the completion of the initial\n * navigation.\n * * 'enabledBlocking' - The initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete. This value is required\n * for [server-side rendering](guide/universal) to work.\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\n * the root component gets created. Use if there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic.\n *\n * The following values have been [deprecated](guide/releases#deprecation-practices) since v11,\n * and should not be used for new applications.\n *\n * * 'enabled' - This option is 1:1 replaceable with `enabledBlocking`.\n *\n * @see `forRoot()`\n *\n * @publicApi\n */\nexport type InitialNavigation = 'disabled'|'enabled'|'enabledBlocking'|'enabledNonBlocking';\n\n/**\n * A set of configuration options for a router module, provided in the\n * `forRoot()` method.\n *\n * @see `forRoot()`\n *\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n  /**\n   * When true, log all internal navigation events to the console.\n   * Use for debugging.\n   */\n  enableTracing?: boolean;\n\n  /**\n   * When true, enable the location strategy that uses the URL fragment\n   * instead of the history API.\n   */\n  useHash?: boolean;\n\n  /**\n   * One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.\n   * When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root\n   * component is created. The bootstrap is blocked until the initial navigation is complete. This\n   * value is required for [server-side rendering](guide/universal) to work. When set to\n   * `enabledNonBlocking`, the initial navigation starts after the root component has been created.\n   * The bootstrap is not blocked on the completion of the initial navigation. When set to\n   * `disabled`, the initial navigation is not performed. The location listener is set up before the\n   * root component gets created. Use if there is a reason to have more control over when the router\n   * starts its initial navigation due to some complex initialization logic.\n   */\n  initialNavigation?: InitialNavigation;\n\n  /**\n   * A custom error handler for failed navigations.\n   * If the handler returns a value, the navigation Promise is resolved with this value.\n   * If the handler throws an exception, the navigation Promise is rejected with the exception.\n   *\n   */\n  errorHandler?: ErrorHandler;\n\n  /**\n   * Configures a preloading strategy.\n   * One of `PreloadAllModules` or `NoPreloading` (the default).\n   */\n  preloadingStrategy?: any;\n\n  /**\n   * Define what the router should do if it receives a navigation request to the current URL.\n   * Default is `ignore`, which causes the router ignores the navigation.\n   * This can disable features such as a \"refresh\" button.\n   * Use this option to configure the behavior when navigating to the\n   * current URL. Default is 'ignore'.\n   */\n  onSameUrlNavigation?: 'reload'|'ignore';\n\n  /**\n   * Configures if the scroll position needs to be restored when navigating back.\n   *\n   * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\n   * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\n   * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\n   * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\n   * navigation). This option will be the default in the future.\n   *\n   * You can implement custom scroll restoration behavior by adapting the enabled behavior as\n   * in the following example.\n   *\n   * ```typescript\n   * class AppModule {\n   *   constructor(router: Router, viewportScroller: ViewportScroller) {\n   *     router.events.pipe(\n   *       filter((e: Event): e is Scroll => e instanceof Scroll)\n   *     ).subscribe(e => {\n   *       if (e.position) {\n   *         // backward navigation\n   *         viewportScroller.scrollToPosition(e.position);\n   *       } else if (e.anchor) {\n   *         // anchor navigation\n   *         viewportScroller.scrollToAnchor(e.anchor);\n   *       } else {\n   *         // forward navigation\n   *         viewportScroller.scrollToPosition([0, 0]);\n   *       }\n   *     });\n   *   }\n   * }\n   * ```\n   */\n  scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n  /**\n   * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\n   * Anchor scrolling is disabled by default.\n   *\n   * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n   * that we stored or scroll to the top.\n   */\n  anchorScrolling?: 'disabled'|'enabled';\n\n  /**\n   * Configures the scroll offset the router will use when scrolling to an element.\n   *\n   * When given a tuple with x and y position value,\n   * the router uses that offset each time it scrolls.\n   * When given a function, the router invokes the function every time\n   * it restores scroll position.\n   */\n  scrollOffset?: [number, number]|(() => [number, number]);\n\n  /**\n   * Defines how the router merges parameters, data, and resolved data from parent to child\n   * routes. By default ('emptyOnly'), inherits parent parameters only for\n   * path-less or component-less routes.\n   *\n   * Set to 'always' to enable unconditional inheritance of parent parameters.\n   *\n   * Note that when dealing with matrix parameters, \"parent\" refers to the parent `Route`\n   * config which does not necessarily mean the \"URL segment to the left\". When the `Route` `path`\n   * contains multiple segments, the matrix parameters must appear on the last segment. For example,\n   * matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not\n   * `a;foo=bar/b`.\n   *\n   */\n  paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n  /**\n   * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\n   * invalid character sequences.\n   * The default implementation is to redirect to the root URL, dropping\n   * any path or parameter information. The function takes three parameters:\n   *\n   * - `'URIError'` - Error thrown when parsing a bad URL.\n   * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n   * - `'url'` -  The malformed URL that caused the URIError\n   * */\n  malformedUriErrorHandler?:\n      (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n  /**\n   * Defines when the router updates the browser URL. By default ('deferred'),\n   * update after successful navigation.\n   * Set to 'eager' if prefer to update the URL at the beginning of navigation.\n   * Updating the URL early allows you to handle a failure of navigation by\n   * showing an error message with the URL that failed.\n   */\n  urlUpdateStrategy?: 'deferred'|'eager';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * Example:\n   *\n   * ```\n   * const routes = [\n   *   {\n   *     path: '',\n   *     component: ContainerComponent,\n   *     children: [\n   *       { path: 'a', component: AComponent },\n   *       { path: 'b', component: BComponent },\n   *     ]\n   *   }\n   * ];\n   * ```\n   *\n   * From the `ContainerComponent`, you should be able to navigate to `AComponent` using\n   * the following `routerLink`, but it will not work if `relativeLinkResolution` is set\n   * to `'legacy'`:\n   *\n   * `<a [routerLink]=\"['./a']\">Link to A</a>`\n   *\n   * However, this will work:\n   *\n   * `<a [routerLink]=\"['../a']\">Link to A</a>`\n   *\n   * In other words, you're required to use `../` rather than `./` when the relative link\n   * resolution is set to `'legacy'`.\n   *\n   * The default in v11 is `corrected`.\n   */\n  relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n    urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n    injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][],\n    opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n    routeReuseStrategy?: RouteReuseStrategy) {\n  const router = new Router(\n      null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n  if (urlHandlingStrategy) {\n    router.urlHandlingStrategy = urlHandlingStrategy;\n  }\n\n  if (routeReuseStrategy) {\n    router.routeReuseStrategy = routeReuseStrategy;\n  }\n\n  assignExtraOptionsToRouter(opts, router);\n\n  if (opts.enableTracing) {\n    router.events.subscribe((e: Event) => {\n      // tslint:disable:no-console\n      console.group?.(`Router Event: ${(<any>e.constructor).name}`);\n      console.log(e.toString());\n      console.log(e);\n      console.groupEnd?.();\n      // tslint:enable:no-console\n    });\n  }\n\n  return router;\n}\n\nexport function assignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void {\n  if (opts.errorHandler) {\n    router.errorHandler = opts.errorHandler;\n  }\n\n  if (opts.malformedUriErrorHandler) {\n    router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n  }\n\n  if (opts.onSameUrlNavigation) {\n    router.onSameUrlNavigation = opts.onSameUrlNavigation;\n  }\n\n  if (opts.paramsInheritanceStrategy) {\n    router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n  }\n\n  if (opts.relativeLinkResolution) {\n    router.relativeLinkResolution = opts.relativeLinkResolution;\n  }\n\n  if (opts.urlUpdateStrategy) {\n    router.urlUpdateStrategy = opts.urlUpdateStrategy;\n  }\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n  return router.routerState.root;\n}\n\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer implements OnDestroy {\n  private initNavigation = false;\n  private destroyed = false;\n  private resultOfPreactivationDone = new Subject<void>();\n\n  constructor(private injector: Injector) {}\n\n  appInitializer(): Promise<any> {\n    const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n    return p.then(() => {\n      // If the injector was destroyed, the DI lookups below will fail.\n      if (this.destroyed) {\n        return Promise.resolve(true);\n      }\n\n      let resolve: Function = null!;\n      const res = new Promise(r => resolve = r);\n      const router = this.injector.get(Router);\n      const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n      if (opts.initialNavigation === 'disabled') {\n        router.setUpLocationChangeListener();\n        resolve(true);\n      } else if (\n          // TODO: enabled is deprecated as of v11, can be removed in v13\n          opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') {\n        router.hooks.afterPreactivation = () => {\n          // only the initial navigation should be delayed\n          if (!this.initNavigation) {\n            this.initNavigation = true;\n            resolve(true);\n            return this.resultOfPreactivationDone;\n\n            // subsequent navigations should not be delayed\n          } else {\n            return of(null) as any;\n          }\n        };\n        router.initialNavigation();\n      } else {\n        resolve(true);\n      }\n\n      return res;\n    });\n  }\n\n  bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n    const opts = this.injector.get(ROUTER_CONFIGURATION);\n    const preloader = this.injector.get(RouterPreloader);\n    const routerScroller = this.injector.get(RouterScroller);\n    const router = this.injector.get(Router);\n    const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n\n    // Default case\n    if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) {\n      router.initialNavigation();\n    }\n\n    preloader.setUpPreloading();\n    routerScroller.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    this.resultOfPreactivationDone.next(null!);\n    this.resultOfPreactivationDone.complete();\n  }\n\n  ngOnDestroy() {\n    this.destroyed = true;\n  }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n  return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n  return r.bootstrapListener.bind(r);\n}\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n    new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer(): ReadonlyArray<Provider> {\n  return [\n    RouterInitializer,\n    {\n      provide: APP_INITIALIZER,\n      multi: true,\n      useFactory: getAppInitializer,\n      deps: [RouterInitializer]\n    },\n    {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n  ];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('12.2.9');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, DeprecatedLoadChildren, LoadChildren, LoadChildrenCallback, QueryParamsHandling, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatcher, UrlMatchResult} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet, RouterOutletContract} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {BaseRouteReuseStrategy, DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationBehaviorOptions, NavigationExtras, Router, UrlCreationOptions} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, InitialNavigation, provideRoutes, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, IsActiveMatchOptions, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {EmptyOutletComponent as ɵangular_packages_router_router_l} from './src/components/empty_outlet';\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_o} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_m,TreeNode as ɵangular_packages_router_router_n} from './src/utils/tree';"]}
+{"version":3,"file":"router.js","sources":["../../../../../../packages/router/src/events.ts","../../../../../../packages/router/src/shared.ts","../../../../../../packages/router/src/utils/collection.ts","../../../../../../packages/router/src/url_tree.ts","../../../../../../packages/router/src/utils/tree.ts","../../../../../../packages/router/src/router_state.ts","../../../../../../packages/router/src/create_router_state.ts","../../../../../../packages/router/src/create_url_tree.ts","../../../../../../packages/router/src/operators/activate_routes.ts","../../../../../../packages/router/src/config.ts","../../../../../../packages/router/src/utils/type_guards.ts","../../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../../packages/router/src/components/empty_outlet.ts","../../../../../../packages/router/src/utils/config.ts","../../../../../../packages/router/src/utils/config_matching.ts","../../../../../../packages/router/src/apply_redirects.ts","../../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../../packages/router/src/utils/preactivation.ts","../../../../../../packages/router/src/operators/check_guards.ts","../../../../../../packages/router/src/recognize.ts","../../../../../../packages/router/src/operators/recognize.ts","../../../../../../packages/router/src/operators/resolve_data.ts","../../../../../../packages/router/src/operators/switch_tap.ts","../../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../../packages/router/src/router_config_loader.ts","../../../../../../packages/router/src/router_outlet_context.ts","../../../../../../packages/router/src/url_handling_strategy.ts","../../../../../../packages/router/src/router.ts","../../../../../../packages/router/src/directives/router_link.ts","../../../../../../packages/router/src/directives/router_link_active.ts","../../../../../../packages/router/src/directives/router_outlet.ts","../../../../../../packages/router/src/router_preloader.ts","../../../../../../packages/router/src/router_scroller.ts","../../../../../../packages/router/src/router_module.ts","../../../../../../packages/router/src/version.ts","../../../../../../packages/router/src/private_export.ts","../../../../../../packages/router/src/index.ts","../../../../../../packages/router/public_api.ts","../../../../../../packages/router/index.ts","../../../../../../packages/router/router.ts"],"names":["isObservable","isPromise","EmptyOutletComponent","noMatch","last","applyRedirects","applyRedirectsFn","NoMatch","recognize","recognizeFn","Console"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAa,WAAW;AACxB,IAAE;AACF;AAA2E,IAC9D,EAAU;AACtB;AAAgE,IACpD,GAAW;AAAI,QAFf,OAAE,GAAF,EAAE,CAAQ;AAAC,QAEX,QAAG,GAAH,GAAG,CAAQ;AAAC,KAAG;AAC5B,CAAC;AAED;AACA;AACA;AACA;AACA;AACA,MAAa,eAAgB,SAAQ,WAAW;AAChD,IA6BE;AACF;AAA4B,IACtB,EAAU;AACf;AAA4B,IACvB,GAAW;AAChB;AAA4B,IACvB,oBAA0D,YAAY;AAC3E;AAA4B,IACvB,gBAA+D,IAAI;AACzE,QAAI,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AACnB,QAAI,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAA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ACnC;AAAC;AAAI,EADiD,FClBtD;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AAK44B","sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * Identifies the call or event that triggered a navigation.\n *\n * * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.\n * * 'popstate' : Triggered by a `popstate` event.\n * * 'hashchange'-: Triggered by a `hashchange` event.\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative'|'popstate'|'hashchange';\n\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n *   constructor(public router: Router) {\n *     router.events.pipe(\n *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n *     ).subscribe((e: RouterEvent) => {\n *       // Do something\n *     });\n *   }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router-reference#router-events)\n * @publicApi\n */\nexport class RouterEvent {\n  constructor(\n      /** A unique ID that the router assigns to every router navigation. */\n      public id: number,\n      /** The URL that is the destination for this navigation. */\n      public url: string) {}\n}\n\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n  /**\n   * Identifies the call or event that triggered the navigation.\n   * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n   *\n   * @see `NavigationEnd`\n   * @see `NavigationCancel`\n   * @see `NavigationError`\n   */\n  navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n  /**\n   * The navigation state that was previously supplied to the `pushState` call,\n   * when the navigation is triggered by a `popstate` event. Otherwise null.\n   *\n   * The state object is defined by `NavigationExtras`, and contains any\n   * developer-defined state value, as well as a unique ID that\n   * the router assigns to every router transition/navigation.\n   *\n   * From the perspective of the router, the router never \"goes back\".\n   * When the user clicks on the back button in the browser,\n   * a new navigation ID is created.\n   *\n   * Use the ID in this previous-state object to differentiate between a newly created\n   * state and one returned to by a `popstate` event, so that you can restore some\n   * remembered state, such as scroll position.\n   *\n   */\n  restoredState?: {[k: string]: any, navigationId: number}|null;\n\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n      /** @docsNotRequired */\n      restoredState: {[k: string]: any, navigationId: number}|null = null) {\n    super(id, url);\n    this.navigationTrigger = navigationTrigger;\n    this.restoredState = restoredState;\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public reason: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationCancel`\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public error: any) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n  }\n}\n\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot,\n      /** @docsNotRequired */\n      public shouldActivate: boolean) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see `ResolveEnd`\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadStart(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadEnd(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see  `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart`\n * @publicApi\n */\nexport class ChildActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nexport class Scroll {\n  constructor(\n      /** @docsNotRequired */\n      readonly routerEvent: NavigationEnd,\n\n      /** @docsNotRequired */\n      readonly position: [number, number]|null,\n\n      /** @docsNotRequired */\n      readonly anchor: string|null) {}\n\n  toString(): string {\n    const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n    return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n  }\n}\n\n/**\n * Router events that allow you to track the lifecycle of the router.\n *\n * The events occur in the following sequence:\n *\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\n * the router [lazy loads](/guide/router#lazy-loading) a route configuration.\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\n * and the routes are recognized.\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\n * phase of routing.\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\n * begins activating a route's children.\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\n * phase of routing successfully.\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\n * phase of routing.\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\n * phase of routing successfully.\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\n * activating a route's children.\n * * [ActivationEnd](api/router/ActivationEnd): When the router finishes activating a route.\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\n * * [NavigationError](api/router/NavigationError): When navigation fails\n * due to an unexpected error.\n * * [Scroll](api/router/Scroll): When the user scrolls.\n *\n * @publicApi\n */\nexport type Event = RouterEvent|RouteConfigLoadStart|RouteConfigLoadEnd|ChildActivationStart|\n    ChildActivationEnd|ActivationStart|ActivationEnd|Scroll;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of matrix and query URL parameters.\n * @see `convertToParamMap()`\n * @see `ParamMap`\n *\n * @publicApi\n */\nexport type Params = {\n  [key: string]: any;\n};\n\n/**\n * A map that provides access to the required and optional parameters\n * specific to a route.\n * The map supports retrieving a single value with `get()`\n * or multiple values with `getAll()`.\n *\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n *\n * @publicApi\n */\nexport interface ParamMap {\n  /**\n   * Reports whether the map contains a given parameter.\n   * @param name The parameter name.\n   * @returns True if the map contains the given parameter, false otherwise.\n   */\n  has(name: string): boolean;\n  /**\n   * Retrieves a single value for a parameter.\n   * @param name The parameter name.\n   * @return The parameter's single value,\n   * or the first value if the parameter has multiple values,\n   * or `null` when there is no such parameter.\n   */\n  get(name: string): string|null;\n  /**\n   * Retrieves multiple values for a parameter.\n   * @param name The parameter name.\n   * @return An array containing one or more values,\n   * or an empty array if there is no such parameter.\n   *\n   */\n  getAll(name: string): string[];\n\n  /** Names of the parameters in the map. */\n  readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n  private params: Params;\n\n  constructor(params: Params) {\n    this.params = params || {};\n  }\n\n  has(name: string): boolean {\n    return Object.prototype.hasOwnProperty.call(this.params, name);\n  }\n\n  get(name: string): string|null {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v[0] : v;\n    }\n\n    return null;\n  }\n\n  getAll(name: string): string[] {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v : [v];\n    }\n\n    return [];\n  }\n\n  get keys(): string[] {\n    return Object.keys(this.params);\n  }\n}\n\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n  return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n  const error = Error('NavigationCancelingError: ' + message);\n  (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n  return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n  return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n    segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n  const parts = route.path!.split('/');\n\n  if (parts.length > segments.length) {\n    // The actual URL is shorter than the config, no match\n    return null;\n  }\n\n  if (route.pathMatch === 'full' &&\n      (segmentGroup.hasChildren() || parts.length < segments.length)) {\n    // The config is longer than the actual URL but we are looking for a full match, return null\n    return null;\n  }\n\n  const posParams: {[key: string]: UrlSegment} = {};\n\n  // Check each config part against the actual URL\n  for (let index = 0; index < parts.length; index++) {\n    const part = parts[index];\n    const segment = segments[index];\n    const isParameter = part.startsWith(':');\n    if (isParameter) {\n      posParams[part.substring(1)] = segment;\n    } else if (part !== segment.path) {\n      // The actual URL part does not match the config, no match\n      return null;\n    }\n  }\n\n  return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {from, Observable, of} from 'rxjs';\n\nimport {Params} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; ++i) {\n    if (!shallowEqual(a[i], b[i])) return false;\n  }\n  return true;\n}\n\nexport function shallowEqual(a: Params, b: Params): boolean {\n  // While `undefined` should never be possible, it would sometimes be the case in IE 11\n  // and pre-chromium Edge. The check below accounts for this edge case.\n  const k1 = a ? Object.keys(a) : undefined;\n  const k2 = b ? Object.keys(b) : undefined;\n  if (!k1 || !k2 || k1.length != k2.length) {\n    return false;\n  }\n  let key: string;\n  for (let i = 0; i < k1.length; i++) {\n    key = k1[i];\n    if (!equalArraysOrString(a[key], b[key])) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Test equality for arrays of strings or a string.\n */\nexport function equalArraysOrString(a: string|string[], b: string|string[]) {\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    const aSorted = [...a].sort();\n    const bSorted = [...b].sort();\n    return aSorted.every((val, index) => bSorted[index] === val);\n  } else {\n    return a === b;\n  }\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n  return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n  return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n  return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n  for (const prop in map) {\n    if (map.hasOwnProperty(prop)) {\n      callback(map[prop], prop);\n    }\n  }\n}\n\nexport function wrapIntoObservable<T>(value: T|Promise<T>|Observable<T>): Observable<T> {\n  if (isObservable(value)) {\n    return value;\n  }\n\n  if (isPromise(value)) {\n    // Use `Promise.resolve()` to wrap promise-like instances.\n    // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n    // change detection.\n    return from(Promise.resolve(value));\n  }\n\n  return of(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalArraysOrString, forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n  return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\n/**\n * A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`\n * for the current router state.\n *\n * @publicApi\n * @see Router.isActive\n */\nexport interface IsActiveMatchOptions {\n  /**\n   * Defines the strategy for comparing the matrix parameters of two `UrlTree`s.\n   *\n   * The matrix parameter matching is dependent on the strategy for matching the\n   * segments. That is, if the `paths` option is set to `'subset'`, only\n   * the matrix parameters of the matching segments will be compared.\n   *\n   * - `'exact'`: Requires that matching segments also have exact matrix parameter\n   * matches.\n   * - `'subset'`: The matching segments in the router's active `UrlTree` may contain\n   * extra matrix parameters, but those that exist in the `UrlTree` in question must match.\n   * - `'ignored'`: When comparing `UrlTree`s, matrix params will be ignored.\n   */\n  matrixParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the query parameters of two `UrlTree`s.\n   *\n   * - `'exact'`: the query parameters must match exactly.\n   * - `'subset'`: the active `UrlTree` may contain extra parameters,\n   * but must match the key and value of any that exist in the `UrlTree` in question.\n   * - `'ignored'`: When comparing `UrlTree`s, query params will be ignored.\n   */\n  queryParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the `UrlSegment`s of the `UrlTree`s.\n   *\n   * - `'exact'`: all segments in each `UrlTree` must match.\n   * - `'subset'`: a `UrlTree` will be determined to be active if it\n   * is a subtree of the active route. That is, the active route may contain extra\n   * segments, but must at least have all the segements of the `UrlTree` in question.\n   */\n  paths: 'exact'|'subset';\n  /**\n   * - 'exact'`: indicates that the `UrlTree` fragments must be equal.\n   * - `'ignored'`: the fragments will not be compared when determining if a\n   * `UrlTree` is active.\n   */\n  fragment: 'exact'|'ignored';\n}\n\ntype ParamMatchOptions = 'exact'|'subset'|'ignored';\n\ntype PathCompareFn =\n    (container: UrlSegmentGroup, containee: UrlSegmentGroup, matrixParams: ParamMatchOptions) =>\n        boolean;\ntype ParamCompareFn = (container: Params, containee: Params) => boolean;\n\nconst pathCompareMap: Record<IsActiveMatchOptions['paths'], PathCompareFn> = {\n  'exact': equalSegmentGroups,\n  'subset': containsSegmentGroup,\n};\nconst paramCompareMap: Record<ParamMatchOptions, ParamCompareFn> = {\n  'exact': equalParams,\n  'subset': containsParams,\n  'ignored': () => true,\n};\n\nexport function containsTree(\n    container: UrlTree, containee: UrlTree, options: IsActiveMatchOptions): boolean {\n  return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) &&\n      paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) &&\n      !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\n\nfunction equalParams(container: Params, containee: Params): boolean {\n  // TODO: This does not handle array params correctly.\n  return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  if (!equalPath(container.segments, containee.segments)) return false;\n  if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n    return false;\n  }\n  if (container.numberOfChildren !== containee.numberOfChildren) return false;\n  for (const c in containee.children) {\n    if (!container.children[c]) return false;\n    if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n      return false;\n  }\n  return true;\n}\n\nfunction containsParams(container: Params, containee: Params): boolean {\n  return Object.keys(containee).length <= Object.keys(container).length &&\n      Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\n\nfunction containsSegmentGroup(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\n\nfunction containsSegmentGroupHelper(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[],\n    matrixParams: ParamMatchOptions): boolean {\n  if (container.segments.length > containeePaths.length) {\n    const current = container.segments.slice(0, containeePaths.length);\n    if (!equalPath(current, containeePaths)) return false;\n    if (containee.hasChildren()) return false;\n    if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n    return true;\n\n  } else if (container.segments.length === containeePaths.length) {\n    if (!equalPath(container.segments, containeePaths)) return false;\n    if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n    for (const c in containee.children) {\n      if (!container.children[c]) return false;\n      if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n        return false;\n      }\n    }\n    return true;\n\n  } else {\n    const current = containeePaths.slice(0, container.segments.length);\n    const next = containeePaths.slice(container.segments.length);\n    if (!equalPath(container.segments, current)) return false;\n    if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n    if (!container.children[PRIMARY_OUTLET]) return false;\n    return containsSegmentGroupHelper(\n        container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n  }\n}\n\nfunction matrixParamsMatch(\n    containerPaths: UrlSegment[], containeePaths: UrlSegment[], options: ParamMatchOptions) {\n  return containeePaths.every((containeeSegment, i) => {\n    return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n  });\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree =\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n *     const f = tree.fragment; // return 'fragment'\n *     const q = tree.queryParams; // returns {debug: 'true'}\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n *     g.children['support'].segments; // return 1 segment 'help'\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The root segment group of the URL tree */\n      public root: UrlSegmentGroup,\n      /** The query params of the URL */\n      public queryParams: Params,\n      /** The fragment of the URL */\n      public fragment: string|null) {}\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return DEFAULT_SERIALIZER.serialize(this);\n  }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n  /** @internal */\n  _sourceSegment?: UrlSegmentGroup;\n  /** @internal */\n  _segmentIndexShift?: number;\n  /** The parent node in the url tree */\n  parent: UrlSegmentGroup|null = null;\n\n  constructor(\n      /** The URL segments of this group. See `UrlSegment` for more information */\n      public segments: UrlSegment[],\n      /** The list of children of this group */\n      public children: {[key: string]: UrlSegmentGroup}) {\n    forEach(children, (v: any, k: any) => v.parent = this);\n  }\n\n  /** Whether the segment has child segments */\n  hasChildren(): boolean {\n    return this.numberOfChildren > 0;\n  }\n\n  /** Number of child segments */\n  get numberOfChildren(): number {\n    return Object.keys(this.children).length;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePaths(this);\n  }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments;\n *     s[0].path; // returns 'team'\n *     s[0].parameters; // returns {id: 33}\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _parameterMap!: ParamMap;\n\n  constructor(\n      /** The path part of a URL segment */\n      public path: string,\n\n      /** The matrix parameters associated with a segment */\n      public parameters: {[name: string]: string}) {}\n\n  get parameterMap() {\n    if (!this._parameterMap) {\n      this._parameterMap = convertToParamMap(this.parameters);\n    }\n    return this._parameterMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePath(this);\n  }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  if (as.length !== bs.length) return false;\n  return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n    segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n  let res: T[] = [];\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet === PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet !== PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n  /** Parse a url into a `UrlTree` */\n  abstract parse(url: string): UrlTree;\n\n  /** Converts a `UrlTree` into a url */\n  abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n  /** Parses a url into a `UrlTree` */\n  parse(url: string): UrlTree {\n    const p = new UrlParser(url);\n    return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n  }\n\n  /** Converts a `UrlTree` into a url */\n  serialize(tree: UrlTree): string {\n    const segment = `/${serializeSegment(tree.root, true)}`;\n    const query = serializeQueryParams(tree.queryParams);\n    const fragment =\n        typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n\n    return `${segment}${query}${fragment}`;\n  }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n  return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n  if (!segment.hasChildren()) {\n    return serializePaths(segment);\n  }\n\n  if (root) {\n    const primary = segment.children[PRIMARY_OUTLET] ?\n        serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n        '';\n    const children: string[] = [];\n\n    forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n      if (k !== PRIMARY_OUTLET) {\n        children.push(`${k}:${serializeSegment(v, false)}`);\n      }\n    });\n\n    return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n  } else {\n    const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n      if (k === PRIMARY_OUTLET) {\n        return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n      }\n\n      return [`${k}:${serializeSegment(v, false)}`];\n    });\n\n    // use no parenthesis if the only child is a primary outlet route\n    if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n      return `${serializePaths(segment)}/${children[0]}`;\n    }\n\n    return `${serializePaths(segment)}/(${children.join('//')})`;\n  }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n  return encodeURIComponent(s)\n      .replace(/%40/g, '@')\n      .replace(/%3A/gi, ':')\n      .replace(/%24/g, '$')\n      .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n  return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n  return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n  return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n  return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n  return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n  return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n  return Object.keys(params)\n      .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n      .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n  const strParams: string[] =\n      Object.keys(params)\n          .map((name) => {\n            const value = params[name];\n            return Array.isArray(value) ?\n                value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n                `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n          })\n          .filter(s => !!s);\n\n  return strParams.length ? `?${strParams.join('&')}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n  const match = str.match(SEGMENT_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n  const match = str.match(QUERY_PARAM_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n  const match = str.match(QUERY_PARAM_VALUE_RE);\n  return match ? match[0] : '';\n}\n\nclass UrlParser {\n  private remaining: string;\n\n  constructor(private url: string) {\n    this.remaining = url;\n  }\n\n  parseRootSegment(): UrlSegmentGroup {\n    this.consumeOptional('/');\n\n    if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n      return new UrlSegmentGroup([], {});\n    }\n\n    // The root segment group never has segments\n    return new UrlSegmentGroup([], this.parseChildren());\n  }\n\n  parseQueryParams(): Params {\n    const params: Params = {};\n    if (this.consumeOptional('?')) {\n      do {\n        this.parseQueryParam(params);\n      } while (this.consumeOptional('&'));\n    }\n    return params;\n  }\n\n  parseFragment(): string|null {\n    return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n  }\n\n  private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n    if (this.remaining === '') {\n      return {};\n    }\n\n    this.consumeOptional('/');\n\n    const segments: UrlSegment[] = [];\n    if (!this.peekStartsWith('(')) {\n      segments.push(this.parseSegment());\n    }\n\n    while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n      this.capture('/');\n      segments.push(this.parseSegment());\n    }\n\n    let children: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('/(')) {\n      this.capture('/');\n      children = this.parseParens(true);\n    }\n\n    let res: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('(')) {\n      res = this.parseParens(false);\n    }\n\n    if (segments.length > 0 || Object.keys(children).length > 0) {\n      res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n    }\n\n    return res;\n  }\n\n  // parse a segment with its matrix parameters\n  // ie `name;k1=v1;k2`\n  private parseSegment(): UrlSegment {\n    const path = matchSegments(this.remaining);\n    if (path === '' && this.peekStartsWith(';')) {\n      throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n    }\n\n    this.capture(path);\n    return new UrlSegment(decode(path), this.parseMatrixParams());\n  }\n\n  private parseMatrixParams(): {[key: string]: string} {\n    const params: {[key: string]: string} = {};\n    while (this.consumeOptional(';')) {\n      this.parseParam(params);\n    }\n    return params;\n  }\n\n  private parseParam(params: {[key: string]: string}): void {\n    const key = matchSegments(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchSegments(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    params[decode(key)] = decode(value);\n  }\n\n  // Parse a single query parameter `name[=value]`\n  private parseQueryParam(params: Params): void {\n    const key = matchQueryParams(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchUrlQueryParamValue(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    const decodedKey = decodeQuery(key);\n    const decodedVal = decodeQuery(value);\n\n    if (params.hasOwnProperty(decodedKey)) {\n      // Append to existing values\n      let currentVal = params[decodedKey];\n      if (!Array.isArray(currentVal)) {\n        currentVal = [currentVal];\n        params[decodedKey] = currentVal;\n      }\n      currentVal.push(decodedVal);\n    } else {\n      // Create a new value\n      params[decodedKey] = decodedVal;\n    }\n  }\n\n  // parse `(a/b//outlet_name:c/d)`\n  private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n    const segments: {[key: string]: UrlSegmentGroup} = {};\n    this.capture('(');\n\n    while (!this.consumeOptional(')') && this.remaining.length > 0) {\n      const path = matchSegments(this.remaining);\n\n      const next = this.remaining[path.length];\n\n      // if is is not one of these characters, then the segment was unescaped\n      // or the group was not closed\n      if (next !== '/' && next !== ')' && next !== ';') {\n        throw new Error(`Cannot parse url '${this.url}'`);\n      }\n\n      let outletName: string = undefined!;\n      if (path.indexOf(':') > -1) {\n        outletName = path.substr(0, path.indexOf(':'));\n        this.capture(outletName);\n        this.capture(':');\n      } else if (allowPrimary) {\n        outletName = PRIMARY_OUTLET;\n      }\n\n      const children = this.parseChildren();\n      segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n                                                                  new UrlSegmentGroup([], children);\n      this.consumeOptional('//');\n    }\n\n    return segments;\n  }\n\n  private peekStartsWith(str: string): boolean {\n    return this.remaining.startsWith(str);\n  }\n\n  // Consumes the prefix when it is present and returns whether it has been consumed\n  private consumeOptional(str: string): boolean {\n    if (this.peekStartsWith(str)) {\n      this.remaining = this.remaining.substring(str.length);\n      return true;\n    }\n    return false;\n  }\n\n  private capture(str: string): void {\n    if (!this.consumeOptional(str)) {\n      throw new Error(`Expected \"${str}\".`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n  /** @internal */\n  _root: TreeNode<T>;\n\n  constructor(root: TreeNode<T>) {\n    this._root = root;\n  }\n\n  get root(): T {\n    return this._root.value;\n  }\n\n  /**\n   * @internal\n   */\n  parent(t: T): T|null {\n    const p = this.pathFromRoot(t);\n    return p.length > 1 ? p[p.length - 2] : null;\n  }\n\n  /**\n   * @internal\n   */\n  children(t: T): T[] {\n    const n = findNode(t, this._root);\n    return n ? n.children.map(t => t.value) : [];\n  }\n\n  /**\n   * @internal\n   */\n  firstChild(t: T): T|null {\n    const n = findNode(t, this._root);\n    return n && n.children.length > 0 ? n.children[0].value : null;\n  }\n\n  /**\n   * @internal\n   */\n  siblings(t: T): T[] {\n    const p = findPath(t, this._root);\n    if (p.length < 2) return [];\n\n    const c = p[p.length - 2].children.map(c => c.value);\n    return c.filter(cc => cc !== t);\n  }\n\n  /**\n   * @internal\n   */\n  pathFromRoot(t: T): T[] {\n    return findPath(t, this._root).map(s => s.value);\n  }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n  if (value === node.value) return node;\n\n  for (const child of node.children) {\n    const node = findNode(value, child);\n    if (node) return node;\n  }\n\n  return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n  if (value === node.value) return [node];\n\n  for (const child of node.children) {\n    const path = findPath(value, child);\n    if (path.length) {\n      path.unshift(node);\n      return path;\n    }\n  }\n\n  return [];\n}\n\nexport class TreeNode<T> {\n  constructor(public value: T, public children: TreeNode<T>[]) {}\n\n  toString(): string {\n    return `TreeNode(${this.value})`;\n  }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends {outlet: string}>(node: TreeNode<T>|null) {\n  const map: {[outlet: string]: TreeNode<T>} = {};\n\n  if (node) {\n    node.children.forEach(child => map[child.value.outlet] = child);\n  }\n\n  return map;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalSegments, UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const root: ActivatedRoute = state.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n  /** @internal */\n  constructor(\n      root: TreeNode<ActivatedRoute>,\n      /** The current snapshot of the router state */\n      public snapshot: RouterStateSnapshot) {\n    super(root);\n    setRouterState(<RouterState>this, root);\n  }\n\n  override toString(): string {\n    return this.snapshot.toString();\n  }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>|null): RouterState {\n  const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n  const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n  const emptyParams = new BehaviorSubject({});\n  const emptyData = new BehaviorSubject({});\n  const emptyQueryParams = new BehaviorSubject({});\n  const fragment = new BehaviorSubject('');\n  const activated = new ActivatedRoute(\n      emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n      snapshot.root);\n  activated.snapshot = snapshot.root;\n  return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n    urlTree: UrlTree, rootComponent: Type<any>|null): RouterStateSnapshot {\n  const emptyParams = {};\n  const emptyData = {};\n  const emptyQueryParams = {};\n  const fragment = '';\n  const activated = new ActivatedRouteSnapshot(\n      [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n      urlTree.root, -1, {});\n  return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n *     header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n  /** The current snapshot of this route */\n  snapshot!: ActivatedRouteSnapshot;\n  /** @internal */\n  _futureSnapshot: ActivatedRouteSnapshot;\n  /** @internal */\n  _routerState!: RouterState;\n  /** @internal */\n  _paramMap!: Observable<ParamMap>;\n  /** @internal */\n  _queryParamMap!: Observable<ParamMap>;\n\n  /** @internal */\n  constructor(\n      /** An observable of the URL segments matched by this route. */\n      public url: Observable<UrlSegment[]>,\n      /** An observable of the matrix parameters scoped to this route. */\n      public params: Observable<Params>,\n      /** An observable of the query parameters shared by all the routes. */\n      public queryParams: Observable<Params>,\n      /** An observable of the URL fragment shared by all the routes. */\n      public fragment: Observable<string|null>,\n      /** An observable of the static and resolved data of this route. */\n      public data: Observable<Data>,\n      /** The outlet name of the route, a constant. */\n      public outlet: string,\n      /** The component of the route, a constant. */\n      // TODO(vsavkin): remove |string\n      public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n    this._futureSnapshot = futureSnapshot;\n  }\n\n  /** The configuration used to match this route. */\n  get routeConfig(): Route|null {\n    return this._futureSnapshot.routeConfig;\n  }\n\n  /** The root of the router state. */\n  get root(): ActivatedRoute {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree. */\n  get parent(): ActivatedRoute|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree. */\n  get firstChild(): ActivatedRoute|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree. */\n  get children(): ActivatedRoute[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route. */\n  get pathFromRoot(): ActivatedRoute[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  /**\n   * An Observable that contains a map of the required and optional parameters\n   * specific to the route.\n   * The map supports retrieving single and multiple values from the same parameter.\n   */\n  get paramMap(): Observable<ParamMap> {\n    if (!this._paramMap) {\n      this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._paramMap;\n  }\n\n  /**\n   * An Observable that contains a map of the query parameters available to all routes.\n   * The map supports retrieving single and multiple values from the query parameter.\n   */\n  get queryParamMap(): Observable<ParamMap> {\n    if (!this._queryParamMap) {\n      this._queryParamMap =\n          this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n  }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly'|'always';\n\n/** @internal */\nexport type Inherited = {\n  params: Params,\n  data: Data,\n  resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n    route: ActivatedRouteSnapshot,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n  const pathFromRoot = route.pathFromRoot;\n\n  let inheritingStartingFrom = 0;\n  if (paramsInheritanceStrategy !== 'always') {\n    inheritingStartingFrom = pathFromRoot.length - 1;\n\n    while (inheritingStartingFrom >= 1) {\n      const current = pathFromRoot[inheritingStartingFrom];\n      const parent = pathFromRoot[inheritingStartingFrom - 1];\n      // current route is an empty path => inherits its parent's params and data\n      if (current.routeConfig && current.routeConfig.path === '') {\n        inheritingStartingFrom--;\n\n        // parent is componentless => current route should inherit its params and data\n      } else if (!parent.component) {\n        inheritingStartingFrom--;\n\n      } else {\n        break;\n      }\n    }\n  }\n\n  return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n  return pathFromRoot.reduce((res, curr) => {\n    const params = {...res.params, ...curr.params};\n    const data = {...res.data, ...curr.data};\n    const resolve = {...res.resolve, ...curr._resolvedData};\n    return {params, data, resolve};\n  }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n *   constructor(route: ActivatedRoute) {\n *     const id: string = route.snapshot.params.id;\n *     const url: string = route.snapshot.url.join('');\n *     const user = route.snapshot.data.user;\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n  /** The configuration used to match this route **/\n  public readonly routeConfig: Route|null;\n  /** @internal **/\n  _urlSegment: UrlSegmentGroup;\n  /** @internal */\n  _lastPathIndex: number;\n  /** @internal */\n  _resolve: ResolveData;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _resolvedData!: Data;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _routerState!: RouterStateSnapshot;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _paramMap!: ParamMap;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The URL segments matched by this route */\n      public url: UrlSegment[],\n      /**\n       *  The matrix parameters scoped to this route.\n       *\n       *  You can compute all params (or data) in the router state or to get params outside\n       *  of an activated component by traversing the `RouterState` tree as in the following\n       *  example:\n       *  ```\n       *  collectRouteParams(router: Router) {\n       *    let params = {};\n       *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n       *    while (stack.length > 0) {\n       *      const route = stack.pop()!;\n       *      params = {...params, ...route.params};\n       *      stack.push(...route.children);\n       *    }\n       *    return params;\n       *  }\n       *  ```\n       */\n      public params: Params,\n      /** The query parameters shared by all the routes */\n      public queryParams: Params,\n      /** The URL fragment shared by all the routes */\n      public fragment: string|null,\n      /** The static and resolved data of this route */\n      public data: Data,\n      /** The outlet name of the route */\n      public outlet: string,\n      /** The component of the route */\n      public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n      lastPathIndex: number, resolve: ResolveData) {\n    this.routeConfig = routeConfig;\n    this._urlSegment = urlSegment;\n    this._lastPathIndex = lastPathIndex;\n    this._resolve = resolve;\n  }\n\n  /** The root of the router state */\n  get root(): ActivatedRouteSnapshot {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree */\n  get parent(): ActivatedRouteSnapshot|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree */\n  get firstChild(): ActivatedRouteSnapshot|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree */\n  get children(): ActivatedRouteSnapshot[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route */\n  get pathFromRoot(): ActivatedRouteSnapshot[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  get paramMap(): ParamMap {\n    if (!this._paramMap) {\n      this._paramMap = convertToParamMap(this.params);\n    }\n    return this._paramMap;\n  }\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    const url = this.url.map(segment => segment.toString()).join('/');\n    const matched = this.routeConfig ? this.routeConfig.path : '';\n    return `Route(url:'${url}', path:'${matched}')`;\n  }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const snapshot: RouterStateSnapshot = state.snapshot;\n *     const root: ActivatedRouteSnapshot = snapshot.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n  /** @internal */\n  constructor(\n      /** The url from which this snapshot was created */\n      public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n    super(root);\n    setRouterState(<RouterStateSnapshot>this, root);\n  }\n\n  override toString(): string {\n    return serializeNode(this._root);\n  }\n}\n\nfunction setRouterState<U, T extends {_routerState: U}>(state: U, node: TreeNode<T>): void {\n  node.value._routerState = state;\n  node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n  const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n  return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n  if (route.snapshot) {\n    const currentSnapshot = route.snapshot;\n    const nextSnapshot = route._futureSnapshot;\n    route.snapshot = nextSnapshot;\n    if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n      (<any>route.queryParams).next(nextSnapshot.queryParams);\n    }\n    if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n      (<any>route.fragment).next(nextSnapshot.fragment);\n    }\n    if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n      (<any>route.params).next(nextSnapshot.params);\n    }\n    if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n      (<any>route.url).next(nextSnapshot.url);\n    }\n    if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n      (<any>route.data).next(nextSnapshot.data);\n    }\n  } else {\n    route.snapshot = route._futureSnapshot;\n\n    // this is for resolved data\n    (<any>route.data).next(route._futureSnapshot.data);\n  }\n}\n\n\nexport function equalParamsAndUrlSegments(\n    a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n  const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n  const parentsMismatch = !a.parent !== !b.parent;\n\n  return equalUrlParams && !parentsMismatch &&\n      (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent!));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n    routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n    prevState: RouterState): RouterState {\n  const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n  return new RouterState(root, curr);\n}\n\nfunction createNode(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n  // reuse an activated route that is currently displayed on the screen\n  if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n    const value = prevState.value;\n    value._futureSnapshot = curr.value;\n    const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n    return new TreeNode<ActivatedRoute>(value, children);\n  } else {\n    if (routeReuseStrategy.shouldAttach(curr.value)) {\n      // retrieve an activated route that is used to be displayed, but is not currently displayed\n      const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n      if (detachedRouteHandle !== null) {\n        const tree = (detachedRouteHandle as DetachedRouteHandleInternal).route;\n        setFutureSnapshotsOfActivatedRoutes(curr, tree);\n        return tree;\n      }\n    }\n\n    const value = createActivatedRoute(curr.value);\n    const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n    return new TreeNode<ActivatedRoute>(value, children);\n  }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n    curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n  if (curr.value.routeConfig !== result.value.routeConfig) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n  }\n  if (curr.children.length !== result.children.length) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n  }\n  result.value._futureSnapshot = curr.value;\n  for (let i = 0; i < curr.children.length; ++i) {\n    setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n  }\n}\n\nfunction createOrReuseChildren(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState: TreeNode<ActivatedRoute>) {\n  return curr.children.map(child => {\n    for (const p of prevState.children) {\n      if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n        return createNode(routeReuseStrategy, child, p);\n      }\n    }\n    return createNode(routeReuseStrategy, child);\n  });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n  return new ActivatedRoute(\n      new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n      new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n    route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params|null,\n    fragment: string|null): UrlTree {\n  if (commands.length === 0) {\n    return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n  }\n\n  const nav = computeNavigation(commands);\n\n  if (nav.toRoot()) {\n    return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n  }\n\n  const startingPosition = findStartingPosition(nav, urlTree, route);\n\n  const segmentGroup = startingPosition.processChildren ?\n      updateSegmentGroupChildren(\n          startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n      updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n  return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n  return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command: any): command is {outlets: {[key: string]: any}} {\n  return typeof command === 'object' && command != null && command.outlets;\n}\n\nfunction tree(\n    oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n    queryParams: Params|null, fragment: string|null): UrlTree {\n  let qp: any = {};\n  if (queryParams) {\n    forEach(queryParams, (value: any, name: any) => {\n      qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n    });\n  }\n\n  if (urlTree.root === oldSegmentGroup) {\n    return new UrlTree(newSegmentGroup, qp, fragment);\n  }\n\n  return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n    current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n    newSegment: UrlSegmentGroup): UrlSegmentGroup {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n    if (c === oldSegment) {\n      children[outletName] = newSegment;\n    } else {\n      children[outletName] = replaceSegment(c, oldSegment, newSegment);\n    }\n  });\n  return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n  constructor(\n      public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n    if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n      throw new Error('Root segment cannot have matrix parameters');\n    }\n\n    const cmdWithOutlet = commands.find(isCommandWithOutlets);\n    if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n      throw new Error('{outlets:{}} has to be the last command');\n    }\n  }\n\n  public toRoot(): boolean {\n    return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n  }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n  if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n    return new Navigation(true, 0, commands);\n  }\n\n  let numberOfDoubleDots = 0;\n  let isAbsolute = false;\n\n  const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n    if (typeof cmd === 'object' && cmd != null) {\n      if (cmd.outlets) {\n        const outlets: {[k: string]: any} = {};\n        forEach(cmd.outlets, (commands: any, name: string) => {\n          outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n        });\n        return [...res, {outlets}];\n      }\n\n      if (cmd.segmentPath) {\n        return [...res, cmd.segmentPath];\n      }\n    }\n\n    if (!(typeof cmd === 'string')) {\n      return [...res, cmd];\n    }\n\n    if (cmdIdx === 0) {\n      cmd.split('/').forEach((urlPart, partIndex) => {\n        if (partIndex == 0 && urlPart === '.') {\n          // skip './a'\n        } else if (partIndex == 0 && urlPart === '') {  //  '/a'\n          isAbsolute = true;\n        } else if (urlPart === '..') {  //  '../a'\n          numberOfDoubleDots++;\n        } else if (urlPart != '') {\n          res.push(urlPart);\n        }\n      });\n\n      return res;\n    }\n\n    return [...res, cmd];\n  }, []);\n\n  return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n  constructor(\n      public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n  }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n  if (nav.isAbsolute) {\n    return new Position(tree.root, true, 0);\n  }\n\n  if (route.snapshot._lastPathIndex === -1) {\n    const segmentGroup = route.snapshot._urlSegment;\n    // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n    // see issue #26224, #13011, #35687\n    // However, if the ActivatedRoute is the root we should process children like above.\n    const processChildren = segmentGroup === tree.root;\n    return new Position(segmentGroup, processChildren, 0);\n  }\n\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = route.snapshot._lastPathIndex + modifier;\n  return createPositionApplyingDoubleDots(\n      route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n    group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n  let g = group;\n  let ci = index;\n  let dd = numberOfDoubleDots;\n  while (dd > ci) {\n    dd -= ci;\n    g = g.parent!;\n    if (!g) {\n      throw new Error('Invalid number of \\'../\\'');\n    }\n    ci = g.segments.length;\n  }\n  return new Position(g, false, ci - dd);\n}\n\nfunction getOutlets(commands: unknown[]): {[k: string]: unknown[]|string} {\n  if (isCommandWithOutlets(commands[0])) {\n    return commands[0].outlets;\n  }\n\n  return {[PRIMARY_OUTLET]: commands};\n}\n\nfunction updateSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (!segmentGroup) {\n    segmentGroup = new UrlSegmentGroup([], {});\n  }\n  if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n    return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n  }\n\n  const m = prefixedWith(segmentGroup, startIndex, commands);\n  const slicedCommands = commands.slice(m.commandIndex);\n  if (m.match && m.pathIndex < segmentGroup.segments.length) {\n    const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n    g.children[PRIMARY_OUTLET] =\n        new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n    return updateSegmentGroupChildren(g, 0, slicedCommands);\n  } else if (m.match && slicedCommands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else if (m.match && !segmentGroup.hasChildren()) {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  } else if (m.match) {\n    return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n  } else {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  }\n}\n\nfunction updateSegmentGroupChildren(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (commands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else {\n    const outlets = getOutlets(commands);\n    const children: {[key: string]: UrlSegmentGroup} = {};\n\n    forEach(outlets, (commands, outlet) => {\n      if (typeof commands === 'string') {\n        commands = [commands];\n      }\n      if (commands !== null) {\n        children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n      }\n    });\n\n    forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n      if (outlets[childOutlet] === undefined) {\n        children[childOutlet] = child;\n      }\n    });\n    return new UrlSegmentGroup(segmentGroup.segments, children);\n  }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n  let currentCommandIndex = 0;\n  let currentPathIndex = startIndex;\n\n  const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n  while (currentPathIndex < segmentGroup.segments.length) {\n    if (currentCommandIndex >= commands.length) return noMatch;\n    const path = segmentGroup.segments[currentPathIndex];\n    const command = commands[currentCommandIndex];\n    // Do not try to consume command as part of the prefixing if it has outlets because it can\n    // contain outlets other than the one being processed. Consuming the outlets command would\n    // result in other outlets being ignored.\n    if (isCommandWithOutlets(command)) {\n      break;\n    }\n    const curr = `${command}`;\n    const next =\n        currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n    if (currentPathIndex > 0 && curr === undefined) break;\n\n    if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n      if (!compare(curr, next, path)) return noMatch;\n      currentCommandIndex += 2;\n    } else {\n      if (!compare(curr, {}, path)) return noMatch;\n      currentCommandIndex++;\n    }\n    currentPathIndex++;\n  }\n\n  return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  const paths = segmentGroup.segments.slice(0, startIndex);\n\n  let i = 0;\n  while (i < commands.length) {\n    const command = commands[i];\n    if (isCommandWithOutlets(command)) {\n      const children = createNewSegmentChildren(command.outlets);\n      return new UrlSegmentGroup(paths, children);\n    }\n\n    // if we start with an object literal, we need to reuse the path part from the segment\n    if (i === 0 && isMatrixParams(commands[0])) {\n      const p = segmentGroup.segments[startIndex];\n      paths.push(new UrlSegment(p.path, stringify(commands[0])));\n      i++;\n      continue;\n    }\n\n    const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n    const next = (i < commands.length - 1) ? commands[i + 1] : null;\n    if (curr && next && isMatrixParams(next)) {\n      paths.push(new UrlSegment(curr, stringify(next)));\n      i += 2;\n    } else {\n      paths.push(new UrlSegment(curr, {}));\n      i++;\n    }\n  }\n  return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: unknown[]|string}):\n    {[outlet: string]: UrlSegmentGroup} {\n  const children: {[outlet: string]: UrlSegmentGroup} = {};\n  forEach(outlets, (commands, outlet) => {\n    if (typeof commands === 'string') {\n      commands = [commands];\n    }\n    if (commands !== null) {\n      children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n    }\n  });\n  return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n  const res: {[key: string]: string} = {};\n  forEach(params, (v: any, k: string) => res[k] = `${v}`);\n  return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n  return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, advanceActivatedRoute, RouterState} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport const activateRoutes =\n    (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n     forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n        map(t => {\n          new ActivateRoutes(\n              routeReuseStrategy, t.targetRouterState!, t.currentRouterState, forwardEvent)\n              .activate(rootContexts);\n          return t;\n        });\n\nexport class ActivateRoutes {\n  constructor(\n      private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n      private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n  activate(parentContexts: ChildrenOutletContexts): void {\n    const futureRoot = this.futureState._root;\n    const currRoot = this.currState ? this.currState._root : null;\n\n    this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n    advanceActivatedRoute(this.futureState.root);\n    this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n  }\n\n  // De-activate the child route that are not re-used for the future state\n  private deactivateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n    // Recurse on the routes active in the future state to de-activate deeper children\n    futureNode.children.forEach(futureChild => {\n      const childOutletName = futureChild.value.outlet;\n      this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n      delete children[childOutletName];\n    });\n\n    // De-activate the routes that will not be re-used\n    forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n      this.deactivateRouteAndItsChildren(v, contexts);\n    });\n  }\n\n  private deactivateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContext: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    if (future === curr) {\n      // Reusing the node, check to see if the children need to be de-activated\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContext.getContext(future.outlet);\n        if (context) {\n          this.deactivateChildRoutes(futureNode, currNode, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.deactivateChildRoutes(futureNode, currNode, parentContext);\n      }\n    } else {\n      if (curr) {\n        // Deactivate the current route which will not be re-used\n        this.deactivateRouteAndItsChildren(currNode, parentContext);\n      }\n    }\n  }\n\n  private deactivateRouteAndItsChildren(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n      this.detachAndStoreRouteSubtree(route, parentContexts);\n    } else {\n      this.deactivateRouteAndOutlet(route, parentContexts);\n    }\n  }\n\n  private detachAndStoreRouteSubtree(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    if (context && context.outlet) {\n      const componentRef = context.outlet.detach();\n      const contexts = context.children.onOutletDeactivated();\n      this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n    }\n  }\n\n  private deactivateRouteAndOutlet(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    // The context could be `null` if we are on a componentless route but there may still be\n    // children that need deactivating.\n    const contexts = context && route.value.component ? context.children : parentContexts;\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);\n\n    for (const childOutlet of Object.keys(children)) {\n      this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n    }\n\n    if (context && context.outlet) {\n      // Destroy the component\n      context.outlet.deactivate();\n      // Destroy the contexts for all the outlets that were in the component\n      context.children.onOutletDeactivated();\n      // Clear the information about the attached component on the context but keep the reference to\n      // the outlet.\n      context.attachRef = null;\n      context.resolver = null;\n      context.route = null;\n    }\n  }\n\n  private activateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outlet: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n    futureNode.children.forEach(c => {\n      this.activateRoutes(c, children[c.value.outlet], contexts);\n      this.forwardEvent(new ActivationEnd(c.value.snapshot));\n    });\n    if (futureNode.children.length) {\n      this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n    }\n  }\n\n  private activateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContexts: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    advanceActivatedRoute(future);\n\n    // reusing the node\n    if (future === curr) {\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n        this.activateChildRoutes(futureNode, currNode, context.children);\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, currNode, parentContexts);\n      }\n    } else {\n      if (future.component) {\n        // if we have a normal route, we need to place the component into the outlet and recurse.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n\n        if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n          const stored =\n              (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n          this.routeReuseStrategy.store(future.snapshot, null);\n          context.children.onOutletReAttached(stored.contexts);\n          context.attachRef = stored.componentRef;\n          context.route = stored.route.value;\n          if (context.outlet) {\n            // Attach right away when the outlet has already been instantiated\n            // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n            context.outlet.attach(stored.componentRef, stored.route.value);\n          }\n          advanceActivatedRouteNodeAndItsChildren(stored.route);\n        } else {\n          const config = parentLoadedConfig(future.snapshot);\n          const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n          context.attachRef = null;\n          context.route = future;\n          context.resolver = cmpFactoryResolver;\n          if (context.outlet) {\n            // Activate the outlet when it has already been instantiated\n            // Otherwise it will get activated from its `ngOnInit` when instantiated\n            context.outlet.activateWith(future, cmpFactoryResolver);\n          }\n\n          this.activateChildRoutes(futureNode, null, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, null, parentContexts);\n      }\n    }\n  }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n  advanceActivatedRoute(node.value);\n  node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n    if (route && route.component) return null;\n  }\n\n  return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * Represents a route configuration for the Router service.\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\n * in `Route.children`.\n *\n * @see `Route`\n * @see `Router`\n * @see [Router configuration guide](guide/router-reference#configuration)\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * Represents the result of matching URLs with a custom matching function.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @see `UrlMatcher()`\n * @publicApi\n */\nexport type UrlMatchResult = {\n  consumed: UrlSegment[];\n  posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * A function for matching a route against URLs. Implement a custom URL matcher\n * for `Route.matcher` when a combination of `path` and `pathMatch`\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\n *\n * The function takes the following arguments and returns a `UrlMatchResult` object.\n * * *segments* : An array of URL segments.\n * * *group* : A segment group.\n * * *route* : The route to match against.\n *\n * The following example implementation matches HTML files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n    UrlMatchResult|null;\n\n/**\n *\n * Represents static data associated with a particular route.\n *\n * @see `Route#data`\n *\n * @publicApi\n */\nexport type Data = {\n  [name: string]: any\n};\n\n/**\n *\n * Represents the resolved data associated with a particular route.\n *\n * @see `Route#resolve`.\n *\n * @publicApi\n */\nexport type ResolveData = {\n  [name: string]: any\n};\n\n/**\n *\n * A function that is called to resolve a collection of lazy-loaded routes.\n * Must be an arrow function of the following form:\n * `() => import('...').then(mod => mod.MODULE)`\n *\n * For example:\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @see [Route.loadChildren](api/router/Route#loadChildren)\n * @publicApi\n */\nexport type LoadChildrenCallback = () => Type<any>|NgModuleFactory<any>|Observable<Type<any>>|\n    Promise<NgModuleFactory<any>|Type<any>|any>;\n\n/**\n *\n * A function that returns a set of routes to load.\n *\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\n * form (`LoadChildrenCallback`) should be used instead.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n */\nexport type LoadChildren = LoadChildrenCallback|DeprecatedLoadChildren;\n\n/**\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n * @deprecated The `string` form of `loadChildren` is deprecated in favor of the\n * `LoadChildrenCallback` function which uses the ES dynamic `import()` expression.\n * This offers a more natural and standards-based mechanism to dynamically\n * load an ES module at runtime.\n */\nexport type DeprecatedLoadChildren = string;\n\n/**\n *\n * How to handle query parameters in a router link.\n * One of:\n * - `merge` : Merge new with current parameters.\n * - `preserve` : Preserve current parameters.\n *\n * @see `UrlCreationOptions#queryParamsHandling`\n * @see `RouterLink`\n * @publicApi\n */\nexport type QueryParamsHandling = 'merge'|'preserve'|'';\n\n/**\n *\n * A policy for when to run guards and resolvers on a route.\n *\n * @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)\n * @publicApi\n */\nexport type RunGuardsAndResolvers =\n    'pathParamsChange'|'pathParamsOrQueryParamsChange'|'paramsChange'|'paramsOrQueryParamsChange'|\n    'always'|((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * A configuration object that defines a single route.\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\n * The router attempts to match segments of a given URL against each route,\n * using the configuration options defined in this object.\n *\n * Supports static, parameterized, redirect, and wildcard routes, as well as\n * custom route data and resolve methods.\n *\n * For detailed usage information, see the [Routing Guide](guide/router).\n *\n * @usageNotes\n *\n * ### Simple Configuration\n *\n * The following route specifies that when navigating to, for example,\n * `/team/11/user/bob`, the router creates the 'Team' component\n * with the 'User' child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n  *  component: Team,\n *   children: [{\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * ### Multiple Outlets\n *\n * The following route creates sibling components with multiple outlets.\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team\n * }, {\n *   path: 'chat/:user',\n *   component: Chat\n *   outlet: 'aux'\n * }]\n * ```\n *\n * ### Wild Cards\n *\n * The following route uses wild-card notation to specify a component\n * that is always instantiated regardless of where you navigate to.\n *\n * ```\n * [{\n *   path: '**',\n *   component: WildcardComponent\n * }]\n * ```\n *\n * ### Redirects\n *\n * The following route uses the `redirectTo` property to ignore a segment of\n * a given URL when looking for a child path.\n *\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\n * the Team component with the User child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: 'legacy/user/:name',\n *     redirectTo: 'user/:name'\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * The redirect path can be relative, as shown in this example, or absolute.\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\n * the result URL is also absolute, '/user/jim'.\n\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any URL segments.\n *\n * In the following configuration, when navigating to\n * `/team/11`, the router instantiates the 'AllUsers' component.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: AllUsers\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * Empty-path routes can have children. In the following example, when navigating\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\n * the user component in it.\n *\n * Note that an empty path route inherits its parent's parameters and data.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: WrapperCmp,\n *     children: [{\n *       path: 'user/:name',\n *       component: User\n *     }]\n *   }]\n * }]\n * ```\n *\n * ### Matching Strategy\n *\n * The default path-match strategy is 'prefix', which means that the router\n * checks URL elements from the left to see if the URL matches a specified path.\n * For example, '/team/11/user' matches 'team/:id'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'prefix', //default\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * You can specify the path-match strategy 'full' to make sure that the path\n * covers the whole unconsumed URL. It is important to do this when redirecting\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating to the redirect destination,\n * creating an endless loop.\n *\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\n * that the router applies the redirect if and only if navigating to '/'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'full',\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * You can share parameters between sibling components.\n * For example, suppose that two sibling components should go next to each other,\n * and both of them require an ID parameter. You can accomplish this using a route\n * that does not specify a component at the top level.\n *\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\n * the main child and aux child components next to each other.\n * For this to work, the application component must have the primary and aux outlets defined.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: 'a', component: MainChild },\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * The router merges the parameters, data, and resolve of the componentless\n * parent into the parameters, data, and resolve of the children.\n *\n * This is especially useful when child components are defined\n * with an empty path string, as in the following example.\n * With this configuration, navigating to '/parent/10' creates\n * the main child and aux components.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: '', component: MainChild },\n *      { path: '', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up application load time by splitting the application\n * into multiple bundles and loading them on demand.\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\n * instead of the `children` property.\n *\n * Given the following example route, the router will lazy load\n * the associated module on demand using the browser native import system.\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @publicApi\n */\nexport interface Route {\n  /**\n   * The path to match against. Cannot be used together with a custom `matcher` function.\n   * A URL string that uses router matching notation.\n   * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\n   * Default is \"/\" (the root path).\n   *\n   */\n  path?: string;\n  /**\n   * The path-matching strategy, one of 'prefix' or 'full'.\n   * Default is 'prefix'.\n   *\n   * By default, the router checks URL elements from the left to see if the URL\n   * matches a given path and stops when there is a config match. Importantly there must still be a\n   * config match for each segment of the URL. For example, '/team/11/user' matches the prefix\n   * 'team/:id' if one of the route's children matches the segment 'user'. That is, the URL\n   * '/team/11/user` matches the config\n   * `{path: 'team/:id', children: [{path: ':user', component: User}]}`\n   * but does not match when there are no children as in `{path: 'team/:id', component: Team}`.\n   *\n   * The path-match strategy 'full' matches against the entire URL.\n   * It is important to do this when redirecting empty-path routes.\n   * Otherwise, because an empty path is a prefix of any URL,\n   * the router would apply the redirect even when navigating\n   * to the redirect destination, creating an endless loop.\n   *\n   */\n  pathMatch?: string;\n  /**\n   * A custom URL-matching function. Cannot be used together with `path`.\n   */\n  matcher?: UrlMatcher;\n  /**\n   * The component to instantiate when the path matches.\n   * Can be empty if child routes specify components.\n   */\n  component?: Type<any>;\n  /**\n   * A URL to redirect to when the path matches.\n   *\n   * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\n   * Note that no further redirects are evaluated after an absolute redirect.\n   *\n   * When not present, router does not redirect.\n   */\n  redirectTo?: string;\n  /**\n   * Name of a `RouterOutlet` object where the component can be placed\n   * when the path matches.\n   */\n  outlet?: string;\n  /**\n   * An array of dependency-injection tokens used to look up `CanActivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * activate the component. By default, any user can activate.\n   */\n  canActivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanActivateChild()` handlers,\n   * in order to determine if the current user is allowed to activate\n   * a child of the component. By default, any user can activate a child.\n   */\n  canActivateChild?: any[];\n  /**\n   * An array of DI tokens used to look up `CanDeactivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * deactivate the component. By default, any user can deactivate.\n   *\n   */\n  canDeactivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanLoad()`\n   * handlers, in order to determine if the current user is allowed to\n   * load the component. By default, any user can load.\n   */\n  canLoad?: any[];\n  /**\n   * Additional developer-defined data provided to the component via\n   * `ActivatedRoute`. By default, no additional data is passed.\n   */\n  data?: Data;\n  /**\n   * A map of DI tokens used to look up data resolvers. See `Resolve`.\n   */\n  resolve?: ResolveData;\n  /**\n   * An array of child `Route` objects that specifies a nested route\n   * configuration.\n   */\n  children?: Routes;\n  /**\n   * An object specifying lazy-loaded child routes.\n   */\n  loadChildren?: LoadChildren;\n  /**\n   * Defines when guards and resolvers will be run. One of\n   * - `paramsOrQueryParamsChange` : Run when query parameters change.\n   * - `always` : Run on every execution.\n   * By default, guards and resolvers run only when the matrix\n   * parameters of the route change.\n   */\n  runGuardsAndResolvers?: RunGuardsAndResolvers;\n  /**\n   * Filled for routes with `loadChildren` once the module has been loaded\n   * @internal\n   */\n  _loadedConfig?: LoadedRouterConfig;\n  /**\n   * Filled for routes with `loadChildren` during load\n   * @internal\n   */\n  _loader$?: Observable<LoadedRouterConfig>;\n}\n\nexport class LoadedRouterConfig {\n  constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n *   return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n *   return fn(1, 2);\n * } else {\n *   throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n  return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n  return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n  return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n  return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n  return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n  return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n  return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {combineLatest, Observable, OperatorFunction} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n    OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n  return switchMap(obs => {\n    return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n               .pipe(\n                   scan(\n                       (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n                         let isPending = false;\n                         return list.reduce((innerAcc, val, i: number) => {\n                           if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n                           // Toggle pending flag if any values haven't been set yet\n                           if (val === INITIAL_VALUE) isPending = true;\n\n                           // Any other return values are only valid if we haven't yet hit a pending\n                           // call. This guarantees that in the case of a guard at the bottom of the\n                           // tree that returns a redirect, we will wait for the higher priority\n                           // guard at the top to finish before performing the redirect.\n                           if (!isPending) {\n                             // Early return when we hit a `false` value as that should always\n                             // cancel navigation\n                             if (val === false) return val;\n\n                             if (i === list.length - 1 || isUrlTree(val)) {\n                               return val;\n                             }\n                           }\n\n                           return innerAcc;\n                         }, acc);\n                       },\n                       INITIAL_VALUE),\n                   filter(item => item !== INITIAL_VALUE),\n                   map(item => isUrlTree(item) ? item : item === true),  //\n                   take(1)) as Observable<boolean|UrlTree>;\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class ɵEmptyOutletComponent {\n}\n\nexport {ɵEmptyOutletComponent as EmptyOutletComponent};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EmptyOutletComponent} from '../components/empty_outlet';\nimport {Route, Routes} from '../config';\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n  // forEach doesn't iterate undefined values\n  for (let i = 0; i < config.length; i++) {\n    const route: Route = config[i];\n    const fullPath: string = getFullPath(parentPath, route);\n    validateNode(route, fullPath);\n  }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (!route) {\n      throw new Error(`\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n    }\n    if (Array.isArray(route)) {\n      throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n    }\n    if (!route.component && !route.children && !route.loadChildren &&\n        (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n    }\n    if (route.redirectTo && route.children) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and children cannot be used together`);\n    }\n    if (route.redirectTo && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and loadChildren cannot be used together`);\n    }\n    if (route.children && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': children and loadChildren cannot be used together`);\n    }\n    if (route.redirectTo && route.component) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and component cannot be used together`);\n    }\n    if (route.redirectTo && route.canActivate) {\n      throw new Error(\n          `Invalid configuration of route '${\n              fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n          `so canActivate will never be executed.`);\n    }\n    if (route.path && route.matcher) {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n    }\n    if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n    }\n    if (route.path === void 0 && route.matcher === void 0) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': routes must have either a path or a matcher specified`);\n    }\n    if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n    }\n    if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n      const exp =\n          `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n      throw new Error(`Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${\n          route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n    }\n    if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n    }\n  }\n  if (route.children) {\n    validateConfig(route.children, fullPath);\n  }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n  if (!currentRoute) {\n    return parentPath;\n  }\n  if (!parentPath && !currentRoute.path) {\n    return '';\n  } else if (parentPath && !currentRoute.path) {\n    return `${parentPath}/`;\n  } else if (!parentPath && currentRoute.path) {\n    return currentRoute.path;\n  } else {\n    return `${parentPath}/${currentRoute.path}`;\n  }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n  const children = r.children && r.children.map(standardizeConfig);\n  const c = children ? {...r, children} : {...r};\n  if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n    c.component = EmptyOutletComponent;\n  }\n  return c;\n}\n\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nexport function getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\n\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nexport function sortByMatchingOutlets(routes: Routes, outletName: string): Routes {\n  const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n  sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n  return sortedConfig;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from '../config';\nimport {defaultUrlMatcher, PRIMARY_OUTLET} from '../shared';\nimport {UrlSegment, UrlSegmentGroup} from '../url_tree';\n\nimport {forEach} from './collection';\nimport {getOutlet} from './config';\n\nexport interface MatchResult {\n  matched: boolean;\n  consumedSegments: UrlSegment[];\n  lastChild: number;\n  parameters: {[k: string]: string};\n  positionalParamSegments: {[k: string]: UrlSegment};\n}\n\nconst noMatch: MatchResult = {\n  matched: false,\n  consumedSegments: [],\n  lastChild: 0,\n  parameters: {},\n  positionalParamSegments: {}\n};\n\nexport function match(\n    segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n  if (route.path === '') {\n    if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n      return {...noMatch};\n    }\n\n    return {\n      matched: true,\n      consumedSegments: [],\n      lastChild: 0,\n      parameters: {},\n      positionalParamSegments: {}\n    };\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n  if (!res) return {...noMatch};\n\n  const posParams: {[n: string]: string} = {};\n  forEach(res.posParams!, (v: UrlSegment, k: string) => {\n    posParams[k] = v.path;\n  });\n  const parameters = res.consumed.length > 0 ?\n      {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n      posParams;\n\n  return {\n    matched: true,\n    consumedSegments: res.consumed,\n    lastChild: res.consumed.length,\n    // TODO(atscott): investigate combining parameters and positionalParamSegments\n    parameters,\n    positionalParamSegments: res.posParams ?? {}\n  };\n}\n\nexport function split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[], relativeLinkResolution: 'legacy'|'corrected' = 'corrected') {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments,\n        createChildrenForEmptyPaths(\n            segmentGroup, consumedSegments, config,\n            new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments,\n        addEmptyPathsToChildrenIfNeeded(\n            segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children,\n            relativeLinkResolution));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments};\n  }\n\n  const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n  s._sourceSegment = segmentGroup;\n  s._segmentIndexShift = consumedSegments.length;\n  return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    routes: Route[], children: {[name: string]: UrlSegmentGroup},\n    relativeLinkResolution: 'legacy'|'corrected'): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  for (const r of routes) {\n    if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      if (relativeLinkResolution === 'legacy') {\n        s._segmentIndexShift = segmentGroup.segments.length;\n      } else {\n        s._segmentIndexShift = consumedSegments.length;\n      }\n      res[getOutlet(r)] = s;\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n    primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegment;\n  primarySegment._sourceSegment = segmentGroup;\n  primarySegment._segmentIndexShift = consumedSegments.length;\n\n  for (const r of routes) {\n    if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      s._segmentIndexShift = consumedSegments.length;\n      res[getOutlet(r)] = s;\n    }\n  }\n  return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '';\n}\n\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nexport function isImmediateMatch(\n    route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n  // a config like\n  // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n  // or even\n  // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n  //\n  // The exception here is when the segment outlet is for the primary outlet. This would\n  // result in a match inside the named outlet because all children there are written as primary\n  // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n  // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n  // This should only match if the url is `/(x:b)`.\n  if (getOutlet(route) !== outlet &&\n      (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n    return false;\n  }\n  if (route.path === '**') {\n    return true;\n  }\n  return match(rawSegment, route, segments).matched;\n}\n\nexport function noLeftoversInUrl(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  return segments.length === 0 && !segmentGroup.children[outlet];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, from, Observable, Observer, of} from 'rxjs';\nimport {catchError, concatMap, first, last, map, mergeMap, scan, tap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {prioritizedGuardValue} from './operators/prioritized_guard_value';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {navigationCancelingError, Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, wrapIntoObservable} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {isCanLoad, isFunction, isUrlTree} from './utils/type_guards';\n\nclass NoMatch {\n  public segmentGroup: UrlSegmentGroup|null;\n\n  constructor(segmentGroup?: UrlSegmentGroup) {\n    this.segmentGroup = segmentGroup || null;\n  }\n}\n\nclass AbsoluteRedirect {\n  constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n          `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n  return new Observable<LoadedRouterConfig>(\n      (obs: Observer<LoadedRouterConfig>) => obs.error(\n          navigationCancelingError(`Cannot load children because the guard of the route \"path: '${\n              route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n  return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n  private allowRedirects: boolean = true;\n  private ngModule: NgModuleRef<any>;\n\n  constructor(\n      moduleInjector: Injector, private configLoader: RouterConfigLoader,\n      private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n    this.ngModule = moduleInjector.get(NgModuleRef);\n  }\n\n  apply(): Observable<UrlTree> {\n    const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n    // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is\n    // only necessary to prevent failures in tests which assert exact object matches. The `split` is\n    // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these\n    // properties. Before the implementations were merged, the `applyRedirects` would not assign\n    // them. We should be able to remove this logic as a \"breaking change\" but should do some more\n    // investigation into the failures first.\n    const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children);\n\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    const urlTrees$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n    }));\n    return urlTrees$.pipe(catchError((e: any) => {\n      if (e instanceof AbsoluteRedirect) {\n        // After an absolute redirect we do not apply any more redirects!\n        // If this implementation changes, update the documentation note in `redirectTo`.\n        this.allowRedirects = false;\n        // we need to run matching, so we can fetch all lazy-loaded modules\n        return this.match(e.urlTree);\n      }\n\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private match(tree: UrlTree): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n    const mapped$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n    }));\n    return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private noMatchError(e: NoMatch): any {\n    return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n  }\n\n  private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string|null):\n      UrlTree {\n    const root = rootCandidate.segments.length > 0 ?\n        new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n        rootCandidate;\n    return new UrlTree(root, queryParams, fragment);\n  }\n\n  private expandSegmentGroup(\n      ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n      outlet: string): Observable<UrlSegmentGroup> {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.expandChildren(ngModule, routes, segmentGroup)\n          .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n    }\n\n    return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n  }\n\n  // Recursively expand segment groups for all the child outlets\n  private expandChildren(\n      ngModule: NgModuleRef<any>, routes: Route[],\n      segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n    // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n    // because an absolute redirect from the primary outlet takes precedence.\n    const childOutlets: string[] = [];\n    for (const child of Object.keys(segmentGroup.children)) {\n      if (child === 'primary') {\n        childOutlets.unshift(child);\n      } else {\n        childOutlets.push(child);\n      }\n    }\n\n    return from(childOutlets)\n        .pipe(\n            concatMap(childOutlet => {\n              const child = segmentGroup.children[childOutlet];\n              // Sort the routes so routes with outlets that match the segment appear\n              // first, followed by routes for other outlets, which might match if they have an\n              // empty path.\n              const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n              return this.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet)\n                  .pipe(map(s => ({segment: s, outlet: childOutlet})));\n            }),\n            scan(\n                (children, expandedChild) => {\n                  children[expandedChild.outlet] = expandedChild.segment;\n                  return children;\n                },\n                {} as {[outlet: string]: UrlSegmentGroup}),\n            last(),\n        );\n  }\n\n  private expandSegment(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n      segments: UrlSegment[], outlet: string,\n      allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    return from(routes).pipe(\n        concatMap((r: any) => {\n          const expanded$ = this.expandSegmentAgainstRoute(\n              ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n          return expanded$.pipe(catchError((e: any) => {\n            if (e instanceof NoMatch) {\n              return of(null);\n            }\n            throw e;\n          }));\n        }),\n        first((s): s is UrlSegmentGroup => !!s), catchError((e: any, _: any) => {\n          if (e instanceof EmptyError || e.name === 'EmptyError') {\n            if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n              return of(new UrlSegmentGroup([], {}));\n            }\n            throw new NoMatch(segmentGroup);\n          }\n          throw e;\n        }));\n  }\n\n  private expandSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n      return noMatch(segmentGroup);\n    }\n\n    if (route.redirectTo === undefined) {\n      return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet);\n    }\n\n    if (allowRedirects && this.allowRedirects) {\n      return this.expandSegmentAgainstRouteUsingRedirect(\n          ngModule, segmentGroup, routes, route, paths, outlet);\n    }\n\n    return noMatch(segmentGroup);\n  }\n\n  private expandSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n          ngModule, routes, route, outlet);\n    }\n\n    return this.expandRegularSegmentAgainstRouteUsingRedirect(\n        ngModule, segmentGroup, routes, route, segments, outlet);\n  }\n\n  private expandWildCardWithParamsAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n      outlet: string): Observable<UrlSegmentGroup> {\n    const newTree = this.applyRedirectCommands([], route.redirectTo!, {});\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      const group = new UrlSegmentGroup(newSegments, {});\n      return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n    }));\n  }\n\n  private expandRegularSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    const {matched, consumedSegments, lastChild, positionalParamSegments} =\n        match(segmentGroup, route, segments);\n    if (!matched) return noMatch(segmentGroup);\n\n    const newTree =\n        this.applyRedirectCommands(consumedSegments, route.redirectTo!, positionalParamSegments);\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      return this.expandSegment(\n          ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n          false);\n    }));\n  }\n\n  private matchSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      if (route.loadChildren) {\n        const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                              this.configLoader.load(ngModule.injector, route);\n        return loaded$.pipe(map((cfg: LoadedRouterConfig) => {\n          route._loadedConfig = cfg;\n          return new UrlSegmentGroup(segments, {});\n        }));\n      }\n\n      return of(new UrlSegmentGroup(segments, {}));\n    }\n\n    const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n    if (!matched) return noMatch(rawSegmentGroup);\n\n    const rawSlicedSegments = segments.slice(lastChild);\n    const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n    return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n      const childModule = routerConfig.module;\n      const childConfig = routerConfig.routes;\n\n      const {segmentGroup: splitSegmentGroup, slicedSegments} =\n          split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n      // See comment on the other call to `split` about why this is necessary.\n      const segmentGroup =\n          new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n\n      if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n        const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n        return expanded$.pipe(\n            map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n      }\n\n      if (childConfig.length === 0 && slicedSegments.length === 0) {\n        return of(new UrlSegmentGroup(consumedSegments, {}));\n      }\n\n      const matchedOnOutlet = getOutlet(route) === outlet;\n      const expanded$ = this.expandSegment(\n          childModule, segmentGroup, childConfig, slicedSegments,\n          matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n      return expanded$.pipe(\n          map((cs: UrlSegmentGroup) =>\n                  new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n    }));\n  }\n\n  private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n      Observable<LoadedRouterConfig> {\n    if (route.children) {\n      // The children belong to the same module\n      return of(new LoadedRouterConfig(route.children, ngModule));\n    }\n\n    if (route.loadChildren) {\n      // lazy children belong to the loaded module\n      if (route._loadedConfig !== undefined) {\n        return of(route._loadedConfig);\n      }\n\n      return this.runCanLoadGuards(ngModule.injector, route, segments)\n          .pipe(mergeMap((shouldLoadResult: boolean) => {\n            if (shouldLoadResult) {\n              return this.configLoader.load(ngModule.injector, route)\n                  .pipe(map((cfg: LoadedRouterConfig) => {\n                    route._loadedConfig = cfg;\n                    return cfg;\n                  }));\n            }\n            return canLoadFails(route);\n          }));\n    }\n\n    return of(new LoadedRouterConfig([], ngModule));\n  }\n\n  private runCanLoadGuards(moduleInjector: Injector, route: Route, segments: UrlSegment[]):\n      Observable<boolean> {\n    const canLoad = route.canLoad;\n    if (!canLoad || canLoad.length === 0) return of(true);\n\n    const canLoadObservables = canLoad.map((injectionToken: any) => {\n      const guard = moduleInjector.get(injectionToken);\n      let guardVal;\n      if (isCanLoad(guard)) {\n        guardVal = guard.canLoad(route, segments);\n      } else if (isFunction<CanLoadFn>(guard)) {\n        guardVal = guard(route, segments);\n      } else {\n        throw new Error('Invalid CanLoad guard');\n      }\n      return wrapIntoObservable(guardVal);\n    });\n\n    return of(canLoadObservables)\n        .pipe(\n            prioritizedGuardValue(),\n            tap((result: UrlTree|boolean) => {\n              if (!isUrlTree(result)) return;\n\n              const error: Error&{url?: UrlTree} = navigationCancelingError(\n                  `Redirecting to \"${this.urlSerializer.serialize(result)}\"`);\n              error.url = result;\n              throw error;\n            }),\n            map(result => result === true),\n        );\n  }\n\n  private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n    let res: UrlSegment[] = [];\n    let c = urlTree.root;\n    while (true) {\n      res = res.concat(c.segments);\n      if (c.numberOfChildren === 0) {\n        return of(res);\n      }\n\n      if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n        return namedOutletsRedirect(route.redirectTo!);\n      }\n\n      c = c.children[PRIMARY_OUTLET];\n    }\n  }\n\n  private applyRedirectCommands(\n      segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n    return this.applyRedirectCreatreUrlTree(\n        redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n  }\n\n  private applyRedirectCreatreUrlTree(\n      redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlTree {\n    const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n    return new UrlTree(\n        newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n        urlTree.fragment);\n  }\n\n  private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n    const res: Params = {};\n    forEach(redirectToParams, (v: any, k: string) => {\n      const copySourceValue = typeof v === 'string' && v.startsWith(':');\n      if (copySourceValue) {\n        const sourceName = v.substring(1);\n        res[k] = actualParams[sourceName];\n      } else {\n        res[k] = v;\n      }\n    });\n    return res;\n  }\n\n  private createSegmentGroup(\n      redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n    const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n    let children: {[n: string]: UrlSegmentGroup} = {};\n    forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n      children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n    });\n\n    return new UrlSegmentGroup(updatedSegments, children);\n  }\n\n  private createSegments(\n      redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n    return redirectToSegments.map(\n        s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n                                      this.findOrReturn(s, actualSegments));\n  }\n\n  private findPosParam(\n      redirectTo: string, redirectToUrlSegment: UrlSegment,\n      posParams: {[k: string]: UrlSegment}): UrlSegment {\n    const pos = posParams[redirectToUrlSegment.path.substring(1)];\n    if (!pos)\n      throw new Error(\n          `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n    return pos;\n  }\n\n  private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n    let idx = 0;\n    for (const s of actualSegments) {\n      if (s.path === redirectToUrlSegment.path) {\n        actualSegments.splice(idx);\n        return s;\n      }\n      idx++;\n    }\n    return redirectToUrlSegment;\n  }\n}\n\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n  if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n    const c = s.children[PRIMARY_OUTLET];\n    return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n  }\n\n  return s;\n}\n\n/**\n * Recursively merges primary segment children into their parents and also drops empty children\n * (those which have no segments and no children themselves). The latter prevents serializing a\n * group into something like `/a(aux:)`, where `aux` is an empty child segment.\n */\nfunction squashSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  const newChildren = {} as any;\n  for (const childOutlet of Object.keys(segmentGroup.children)) {\n    const child = segmentGroup.children[childOutlet];\n    const childCandidate = squashSegmentGroup(child);\n    // don't add empty children\n    if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n      newChildren[childOutlet] = childCandidate;\n    }\n  }\n  const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n  return mergeTrivialChildren(s);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n  return switchMap(\n      t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n               .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, equalParamsAndUrlSegments, RouterStateSnapshot} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport class CanActivate {\n  readonly route: ActivatedRouteSnapshot;\n  constructor(public path: ActivatedRouteSnapshot[]) {\n    this.route = this.path[this.path.length - 1];\n  }\n}\n\nexport class CanDeactivate {\n  constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n  canDeactivateChecks: CanDeactivate[],\n  canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n    future: RouterStateSnapshot, curr: RouterStateSnapshot,\n    parentContexts: ChildrenOutletContexts) {\n  const futureRoot = future._root;\n  const currRoot = curr ? curr._root : null;\n\n  return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n    {node: ActivatedRouteSnapshot, guards: any[]}|null {\n  const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n  if (!canActivateChild || canActivateChild.length === 0) return null;\n  return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n    token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n  const config = getClosestLoadedConfig(snapshot);\n  const injector = config ? config.module.injector : moduleInjector;\n  return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  if (!snapshot) return null;\n\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n  }\n\n  return null;\n}\n\nfunction getChildRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>|null,\n    contexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[], checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const prevChildren = nodeChildrenAsMap(currNode);\n\n  // Process the children of the future route\n  futureNode.children.forEach(c => {\n    getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n    delete prevChildren[c.value.outlet];\n  });\n\n  // Process any children left from the current route (not active for the future route)\n  forEach(\n      prevChildren,\n      (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n          deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks));\n\n  return checks;\n}\n\nfunction getRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n    parentContexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[],\n    checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const future = futureNode.value;\n  const curr = currNode ? currNode.value : null;\n  const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n  // reusing the node\n  if (curr && future.routeConfig === curr.routeConfig) {\n    const shouldRun =\n        shouldRunGuardsAndResolvers(curr, future, future.routeConfig!.runGuardsAndResolvers);\n    if (shouldRun) {\n      checks.canActivateChecks.push(new CanActivate(futurePath));\n    } else {\n      // we need to set the data\n      future.data = curr.data;\n      future._resolvedData = curr._resolvedData;\n    }\n\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(\n          futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n    }\n\n    if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n      checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n    }\n  } else {\n    if (curr) {\n      deactivateRouteAndItsChildren(currNode, context, checks);\n    }\n\n    checks.canActivateChecks.push(new CanActivate(futurePath));\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n    }\n  }\n\n  return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n    curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n    mode: RunGuardsAndResolvers|undefined): boolean {\n  if (typeof mode === 'function') {\n    return mode(curr, future);\n  }\n  switch (mode) {\n    case 'pathParamsChange':\n      return !equalPath(curr.url, future.url);\n\n    case 'pathParamsOrQueryParamsChange':\n      return !equalPath(curr.url, future.url) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'always':\n      return true;\n\n    case 'paramsOrQueryParamsChange':\n      return !equalParamsAndUrlSegments(curr, future) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'paramsChange':\n    default:\n      return !equalParamsAndUrlSegments(curr, future);\n  }\n}\n\nfunction deactivateRouteAndItsChildren(\n    route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext|null, checks: Checks): void {\n  const children = nodeChildrenAsMap(route);\n  const r = route.value;\n\n  forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n    if (!r.component) {\n      deactivateRouteAndItsChildren(node, context, checks);\n    } else if (context) {\n      deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n    } else {\n      deactivateRouteAndItsChildren(node, null, checks);\n    }\n  });\n\n  if (!r.component) {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  } else if (context && context.outlet && context.outlet.isActivated) {\n    checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n  } else {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {concat, defer, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n    MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n    if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n      return of({...t, guardsResult: true});\n    }\n\n    return runCanDeactivateChecks(\n               canDeactivateChecks, targetSnapshot!, currentSnapshot, moduleInjector)\n        .pipe(\n            mergeMap(canDeactivate => {\n              return canDeactivate && isBoolean(canDeactivate) ?\n                  runCanActivateChecks(\n                      targetSnapshot!, canActivateChecks, moduleInjector, forwardEvent) :\n                  of(canDeactivate);\n            }),\n            map(guardsResult => ({...t, guardsResult})));\n  });\n}\n\nfunction runCanDeactivateChecks(\n    checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n    moduleInjector: Injector) {\n  return from(checks).pipe(\n      mergeMap(\n          check =>\n              runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n    futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n    forwardEvent?: (evt: Event) => void) {\n  return from(checks).pipe(\n      concatMap((check: CanActivate) => {\n        return concat(\n            fireChildActivationStart(check.route.parent, forwardEvent),\n            fireActivationStart(check.route, forwardEvent),\n            runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n            runCanActivate(futureSnapshot, check.route, moduleInjector));\n      }),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ActivationStart(snapshot));\n  }\n  return of(true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ChildActivationStart(snapshot));\n  }\n  return of(true);\n}\n\nfunction runCanActivate(\n    futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n  if (!canActivate || canActivate.length === 0) return of(true);\n\n  const canActivateObservables = canActivate.map((c: any) => {\n    return defer(() => {\n      const guard = getToken(c, futureARS, moduleInjector);\n      let observable;\n      if (isCanActivate(guard)) {\n        observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n      } else if (isFunction<CanActivateFn>(guard)) {\n        observable = wrapIntoObservable(guard(futureARS, futureRSS));\n      } else {\n        throw new Error('Invalid CanActivate guard');\n      }\n      return observable.pipe(first());\n    });\n  });\n  return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n    futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const futureARS = path[path.length - 1];\n\n  const canActivateChildGuards = path.slice(0, path.length - 1)\n                                     .reverse()\n                                     .map(p => getCanActivateChild(p))\n                                     .filter(_ => _ !== null);\n\n  const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n    return defer(() => {\n      const guardsMapped = d.guards.map((c: any) => {\n        const guard = getToken(c, d.node, moduleInjector);\n        let observable;\n        if (isCanActivateChild(guard)) {\n          observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n        } else if (isFunction<CanActivateChildFn>(guard)) {\n          observable = wrapIntoObservable(guard(futureARS, futureRSS));\n        } else {\n          throw new Error('Invalid CanActivateChild guard');\n        }\n        return observable.pipe(first());\n      });\n      return of(guardsMapped).pipe(prioritizedGuardValue());\n    });\n  });\n  return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n    component: Object|null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n    futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n  if (!canDeactivate || canDeactivate.length === 0) return of(true);\n  const canDeactivateObservables = canDeactivate.map((c: any) => {\n    const guard = getToken(c, currARS, moduleInjector);\n    let observable;\n    if (isCanDeactivate(guard)) {\n      observable = wrapIntoObservable(guard.canDeactivate(component!, currARS, currRSS, futureRSS));\n    } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n      observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n    } else {\n      throw new Error('Invalid CanDeactivate guard');\n    }\n    return observable.pipe(first());\n  });\n  return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of} from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, ParamsInheritanceStrategy, RouterStateSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {last} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nfunction newObservableError(e: unknown): Observable<RouterStateSnapshot> {\n  // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n  return new Observable<RouterStateSnapshot>((obs: Observer<RouterStateSnapshot>) => obs.error(e));\n}\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Routes, urlTree: UrlTree, url: string,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n    relativeLinkResolution: 'legacy'|'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n  try {\n    const result = new Recognizer(\n                       rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n                       relativeLinkResolution)\n                       .recognize();\n    if (result === null) {\n      return newObservableError(new NoMatch());\n    } else {\n      return of(result);\n    }\n  } catch (e) {\n    // Catch the potential error from recognize due to duplicate outlet matches and return as an\n    // `Observable` error instead.\n    return newObservableError(e);\n  }\n}\n\nexport class Recognizer {\n  constructor(\n      private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n      private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n      private relativeLinkResolution: 'legacy'|'corrected') {}\n\n  recognize(): RouterStateSnapshot|null {\n    const rootSegmentGroup =\n        split(\n            this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined),\n            this.relativeLinkResolution)\n            .segmentGroup;\n\n    const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    if (children === null) {\n      return null;\n    }\n\n    // Use Object.freeze to prevent readers of the Router state from modifying it outside of a\n    // navigation, resulting in the router being out of sync with the browser.\n    const root = new ActivatedRouteSnapshot(\n        [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n        {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n\n    const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n    const routeState = new RouterStateSnapshot(this.url, rootNode);\n    this.inheritParamsAndData(routeState._root);\n    return routeState;\n  }\n\n  inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n    const route = routeNode.value;\n\n    const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n    route.params = Object.freeze(i.params);\n    route.data = Object.freeze(i.data);\n\n    routeNode.children.forEach(n => this.inheritParamsAndData(n));\n  }\n\n  processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.processChildren(config, segmentGroup);\n    }\n\n    return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n  }\n\n  /**\n   * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n   * we cannot find a match for _any_ of the children.\n   *\n   * @param config - The `Routes` to match against\n   * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n   *     config.\n   */\n  processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    const children: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n    for (const childOutlet of Object.keys(segmentGroup.children)) {\n      const child = segmentGroup.children[childOutlet];\n      // Sort the config so that routes with outlets that match the one being activated appear\n      // first, followed by routes for other outlets, which might match if they have an empty path.\n      const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n      const outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet);\n      if (outletChildren === null) {\n        // Configs must match all segment children so because we did not find a match for this\n        // outlet, return `null`.\n        return null;\n      }\n      children.push(...outletChildren);\n    }\n    // Because we may have matched two outlets to the same empty path segment, we can have multiple\n    // activated results for the same outlet. We should merge the children of these results so the\n    // final return value is only one `TreeNode` per outlet.\n    const mergedChildren = mergeEmptyPathMatches(children);\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      // This should really never happen - we are only taking the first match for each outlet and\n      // merge the empty path matches.\n      checkOutletNameUniqueness(mergedChildren);\n    }\n    sortActivatedRouteSnapshots(mergedChildren);\n    return mergedChildren;\n  }\n\n  processSegment(\n      config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    for (const r of config) {\n      const children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n      if (children !== null) {\n        return children;\n      }\n    }\n    if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n      return [];\n    }\n\n    return null;\n  }\n\n  processSegmentAgainstRoute(\n      route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return null;\n\n    let snapshot: ActivatedRouteSnapshot;\n    let consumedSegments: UrlSegment[] = [];\n    let rawSlicedSegments: UrlSegment[] = [];\n\n    if (route.path === '**') {\n      const params = segments.length > 0 ? last(segments)!.parameters : {};\n      snapshot = new ActivatedRouteSnapshot(\n          segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n          getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length,\n          getResolve(route));\n    } else {\n      const result = match(rawSegment, route, segments);\n      if (!result.matched) {\n        return null;\n      }\n      consumedSegments = result.consumedSegments;\n      rawSlicedSegments = segments.slice(result.lastChild);\n\n      snapshot = new ActivatedRouteSnapshot(\n          consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment, getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n    }\n\n    const childConfig: Route[] = getChildConfig(route);\n\n    const {segmentGroup, slicedSegments} = split(\n        rawSegment, consumedSegments, rawSlicedSegments,\n        // Filter out routes with redirectTo because we are trying to create activated route\n        // snapshots and don't handle redirects here. That should have been done in\n        // `applyRedirects`.\n        childConfig.filter(c => c.redirectTo === undefined), this.relativeLinkResolution);\n\n    if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n      const children = this.processChildren(childConfig, segmentGroup);\n      if (children === null) {\n        return null;\n      }\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n    }\n\n    if (childConfig.length === 0 && slicedSegments.length === 0) {\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n    }\n\n    const matchedOnOutlet = getOutlet(route) === outlet;\n    // If we matched a config due to empty path match on a different outlet, we need to continue\n    // passing the current outlet for the segment rather than switch to PRIMARY.\n    // Note that we switch to primary when we have a match because outlet configs look like this:\n    // {path: 'a', outlet: 'a', children: [\n    //  {path: 'b', component: B},\n    //  {path: 'c', component: C},\n    // ]}\n    // Notice that the children of the named outlet are configured with the primary outlet\n    const children = this.processSegment(\n        childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet);\n    if (children === null) {\n      return null;\n    }\n    return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n  }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  nodes.sort((a, b) => {\n    if (a.value.outlet === PRIMARY_OUTLET) return -1;\n    if (b.value.outlet === PRIMARY_OUTLET) return 1;\n    return a.value.outlet.localeCompare(b.value.outlet);\n  });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n  if (route.children) {\n    return route.children;\n  }\n\n  if (route.loadChildren) {\n    return route._loadedConfig!.routes;\n  }\n\n  return [];\n}\n\nfunction hasEmptyPathConfig(node: TreeNode<ActivatedRouteSnapshot>) {\n  const config = node.value.routeConfig;\n  return config && config.path === '' && config.redirectTo === undefined;\n}\n\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the\n * children from each duplicate. This is necessary because different outlets can match a single\n * empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes: Array<TreeNode<ActivatedRouteSnapshot>>):\n    Array<TreeNode<ActivatedRouteSnapshot>> {\n  const result: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n  // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n  const mergedNodes: Set<TreeNode<ActivatedRouteSnapshot>> = new Set();\n\n  for (const node of nodes) {\n    if (!hasEmptyPathConfig(node)) {\n      result.push(node);\n      continue;\n    }\n\n    const duplicateEmptyPathNode =\n        result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n    if (duplicateEmptyPathNode !== undefined) {\n      duplicateEmptyPathNode.children.push(...node.children);\n      mergedNodes.add(duplicateEmptyPathNode);\n    } else {\n      result.push(node);\n    }\n  }\n  // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n  // by also merging those children. This is necessary when there are multiple empty path configs in\n  // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n  // of those children can be combined into a single node as well.\n  for (const mergedNode of mergedNodes) {\n    const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n    result.push(new TreeNode(mergedNode.value, mergedChildren));\n  }\n  return result.filter(n => !mergedNodes.has(n));\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  const names: {[k: string]: ActivatedRouteSnapshot} = {};\n  nodes.forEach(n => {\n    const routeWithSameOutletName = names[n.value.outlet];\n    if (routeWithSameOutletName) {\n      const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n      const c = n.value.url.map(s => s.toString()).join('/');\n      throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n    }\n    names[n.value.outlet] = n.value;\n  });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  let s = segmentGroup;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n  }\n  return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n  let s = segmentGroup;\n  let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  }\n  return res - 1;\n}\n\nfunction getData(route: Route): Data {\n  return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n  return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Route[], serializer: (url: UrlTree) => string,\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    relativeLinkResolution: 'legacy'|'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(\n      t => recognizeFn(\n               rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n               paramsInheritanceStrategy, relativeLinkResolution)\n               .pipe(map(targetSnapshot => ({...t, targetSnapshot}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {EMPTY, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, map, mergeMap, takeLast, tap} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, RouterStateSnapshot} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n    if (!canActivateChecks.length) {\n      return of(t);\n    }\n    let canActivateChecksResolved = 0;\n    return from(canActivateChecks)\n        .pipe(\n            concatMap(\n                check => runResolve(\n                    check.route, targetSnapshot!, paramsInheritanceStrategy, moduleInjector)),\n            tap(() => canActivateChecksResolved++),\n            takeLast(1),\n            mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY),\n        );\n  });\n}\n\nfunction runResolve(\n    futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    paramsInheritanceStrategy: 'emptyOnly'|'always', moduleInjector: Injector) {\n  const resolve = futureARS._resolve;\n  return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n      .pipe(map((resolvedData: any) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = {\n          ...futureARS.data,\n          ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve\n        };\n        return null;\n      }));\n}\n\nfunction resolveNode(\n    resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const keys = Object.keys(resolve);\n  if (keys.length === 0) {\n    return of({});\n  }\n  const data: {[k: string]: any} = {};\n  return from(keys).pipe(\n      mergeMap(\n          (key: string) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n                               .pipe(tap((value: any) => {\n                                 data[key] = value;\n                               }))),\n      takeLast(1),\n      mergeMap(() => {\n        // Ensure all resolvers returned values, otherwise don't emit any \"next\" and just complete\n        // the chain which will cancel navigation\n        if (Object.keys(data).length === keys.length) {\n          return of(data);\n        }\n        return EMPTY;\n      }),\n  );\n}\n\nfunction getResolver(\n    injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const resolver = getToken(injectionToken, futureARS, moduleInjector);\n  return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n                            wrapIntoObservable(resolver(futureARS, futureRSS));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {from, MonoTypeOperatorFunction, ObservableInput, of} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n    MonoTypeOperatorFunction<T> {\n  return switchMap(v => {\n    const nextResult = next(v);\n    if (nextResult) {\n      return from(nextResult).pipe(map(() => v));\n    }\n    return of(v);\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n  contexts: Map<string, OutletContext>,\n  componentRef: ComponentRef<any>,\n  route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n  /** Determines if this route (and its subtree) should be detached to be reused later */\n  abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n  /**\n   * Stores the detached route.\n   *\n   * Storing a `null` value should erase the previously stored value.\n   */\n  abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n  /** Determines if this route (and its subtree) should be reattached */\n  abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n  /** Retrieves the previously stored route */\n  abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n  /** Determines if a route should be reused */\n  abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the fragment or query parameters change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nexport abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\n  /**\n   * Whether the given route should detach for later reuse.\n   * Always returns false for `BaseRouteReuseStrategy`.\n   * */\n  shouldDetach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /**\n   * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n   */\n  store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n\n  /** Returns `false`, meaning the route (and its subtree) is never reattached */\n  shouldAttach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /** Returns `null` because this strategy does not store routes for later re-use. */\n  retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null {\n    return null;\n  }\n\n  /**\n   * Determines if a route should be reused.\n   * This strategy returns `true` when the future route config and current route config are\n   * identical.\n   */\n  shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n    return future.routeConfig === curr.routeConfig;\n  }\n}\n\nexport class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectFlags, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {ConnectableObservable, from, Observable, of, Subject} from 'rxjs';\nimport {catchError, map, mergeMap, refCount, tap} from 'rxjs/operators';\n\nimport {LoadChildren, LoadedRouterConfig, Route} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\nimport {standardizeConfig} from './utils/config';\n\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n  constructor(\n      private loader: NgModuleFactoryLoader, private compiler: Compiler,\n      private onLoadStartListener?: (r: Route) => void,\n      private onLoadEndListener?: (r: Route) => void) {}\n\n  load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n    if (route._loader$) {\n      return route._loader$;\n    }\n\n    if (this.onLoadStartListener) {\n      this.onLoadStartListener(route);\n    }\n    const moduleFactory$ = this.loadModuleFactory(route.loadChildren!);\n    const loadRunner = moduleFactory$.pipe(\n        map((factory: NgModuleFactory<any>) => {\n          if (this.onLoadEndListener) {\n            this.onLoadEndListener(route);\n          }\n          const module = factory.create(parentInjector);\n          // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n          // will get stuck in an infinite loop. The child module's Injector will look to\n          // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n          // for it's parent module instead.\n          return new LoadedRouterConfig(\n              flatten(\n                  module.injector.get(ROUTES, undefined, InjectFlags.Self | InjectFlags.Optional))\n                  .map(standardizeConfig),\n              module);\n        }),\n        catchError((err) => {\n          route._loader$ = undefined;\n          throw err;\n        }),\n    );\n    // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n    route._loader$ = new ConnectableObservable(loadRunner, () => new Subject<LoadedRouterConfig>())\n                         .pipe(refCount());\n    return route._loader$;\n  }\n\n  private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n    if (typeof loadChildren === 'string') {\n      return from(this.loader.load(loadChildren));\n    } else {\n      return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n        if (t instanceof NgModuleFactory) {\n          return of(t);\n        } else {\n          return from(this.compiler.compileModuleAsync(t));\n        }\n      }));\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutletContract} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n  outlet: RouterOutletContract|null = null;\n  route: ActivatedRoute|null = null;\n  resolver: ComponentFactoryResolver|null = null;\n  children = new ChildrenOutletContexts();\n  attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n  // contexts for child outlets, by name.\n  private contexts = new Map<string, OutletContext>();\n\n  /** Called when a `RouterOutlet` directive is instantiated */\n  onChildOutletCreated(childName: string, outlet: RouterOutletContract): void {\n    const context = this.getOrCreateContext(childName);\n    context.outlet = outlet;\n    this.contexts.set(childName, context);\n  }\n\n  /**\n   * Called when a `RouterOutlet` directive is destroyed.\n   * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n   * re-created later.\n   */\n  onChildOutletDestroyed(childName: string): void {\n    const context = this.getContext(childName);\n    if (context) {\n      context.outlet = null;\n      context.attachRef = null;\n    }\n  }\n\n  /**\n   * Called when the corresponding route is deactivated during navigation.\n   * Because the component get destroyed, all children outlet are destroyed.\n   */\n  onOutletDeactivated(): Map<string, OutletContext> {\n    const contexts = this.contexts;\n    this.contexts = new Map();\n    return contexts;\n  }\n\n  onOutletReAttached(contexts: Map<string, OutletContext>) {\n    this.contexts = contexts;\n  }\n\n  getOrCreateContext(childName: string): OutletContext {\n    let context = this.getContext(childName);\n\n    if (!context) {\n      context = new OutletContext();\n      this.contexts.set(childName, context);\n    }\n\n    return context;\n  }\n\n  getContext(childName: string): OutletContext|null {\n    return this.contexts.get(childName) || null;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n  /**\n   * Tells the router if this URL should be processed.\n   *\n   * When it returns true, the router will execute the regular navigation.\n   * When it returns false, the router will set the router state to an empty state.\n   * As a result, all the active components will be destroyed.\n   *\n   */\n  abstract shouldProcessUrl(url: UrlTree): boolean;\n\n  /**\n   * Extracts the part of the URL that should be handled by the router.\n   * The rest of the URL will remain untouched.\n   */\n  abstract extract(url: UrlTree): UrlTree;\n\n  /**\n   * Merges the URL fragment with the rest of the URL.\n   */\n  abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n  shouldProcessUrl(url: UrlTree): boolean {\n    return true;\n  }\n  extract(url: UrlTree): UrlTree {\n    return url;\n  }\n  merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree {\n    return newUrlPart;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, PopStateEvent} from '@angular/common';\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, of, Subject, SubscriptionLike} from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, createEmptyState, RouterState, RouterStateSnapshot} from './router_state';\nimport {isNavigationCancelingError, navigationCancelingError, Params} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {containsTree, createEmptyUrlTree, IsActiveMatchOptions, UrlSerializer, UrlTree} from './url_tree';\nimport {standardizeConfig, validateConfig} from './utils/config';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n/**\n * @description\n *\n * Options that modify the `Router` URL.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface UrlCreationOptions {\n  /**\n   * Specifies a root URI to use for relative navigation.\n   *\n   * For example, consider the following route configuration where the parent route\n   * has two children.\n   *\n   * ```\n   * [{\n   *   path: 'parent',\n   *   component: ParentComponent,\n   *   children: [{\n   *     path: 'list',\n   *     component: ListComponent\n   *   },{\n   *     path: 'child',\n   *     component: ChildComponent\n   *   }]\n   * }]\n   * ```\n   *\n   * The following `go()` function navigates to the `list` route by\n   * interpreting the destination URI as relative to the activated `child`  route\n   *\n   * ```\n   *  @Component({...})\n   *  class ChildComponent {\n   *    constructor(private router: Router, private route: ActivatedRoute) {}\n   *\n   *    go() {\n   *      this.router.navigate(['../list'], { relativeTo: this.route });\n   *    }\n   *  }\n   * ```\n   *\n   * A value of `null` or `undefined` indicates that the navigation commands should be applied\n   * relative to the root.\n   */\n  relativeTo?: ActivatedRoute|null;\n\n  /**\n   * Sets query parameters to the URL.\n   *\n   * ```\n   * // Navigate to /results?page=1\n   * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n   * ```\n   */\n  queryParams?: Params|null;\n\n  /**\n   * Sets the hash fragment for the URL.\n   *\n   * ```\n   * // Navigate to /results#top\n   * this.router.navigate(['/results'], { fragment: 'top' });\n   * ```\n   */\n  fragment?: string;\n\n  /**\n   * How to handle query parameters in the router link for the next navigation.\n   * One of:\n   * * `preserve` : Preserve current parameters.\n   * * `merge` : Merge new with current parameters.\n   *\n   * The \"preserve\" option discards any new query params:\n   * ```\n   * // from /view1?page=1 to/view2?page=1\n   * this.router.navigate(['/view2'], { queryParams: { page: 2 },  queryParamsHandling: \"preserve\"\n   * });\n   * ```\n   * The \"merge\" option appends new query params to the params from the current URL:\n   * ```\n   * // from /view1?page=1 to/view2?page=1&otherKey=2\n   * this.router.navigate(['/view2'], { queryParams: { otherKey: 2 },  queryParamsHandling: \"merge\"\n   * });\n   * ```\n   * In case of a key collision between current parameters and those in the `queryParams` object,\n   * the new value is used.\n   *\n   */\n  queryParamsHandling?: QueryParamsHandling|null;\n\n  /**\n   * When true, preserves the URL fragment for the next navigation\n   *\n   * ```\n   * // Preserve fragment from /results#top to /view#top\n   * this.router.navigate(['/view'], { preserveFragment: true });\n   * ```\n   */\n  preserveFragment?: boolean;\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the navigation should be handled.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface NavigationBehaviorOptions {\n  /**\n   * When true, navigates without pushing a new state into history.\n   *\n   * ```\n   * // Navigate silently to /view\n   * this.router.navigate(['/view'], { skipLocationChange: true });\n   * ```\n   */\n  skipLocationChange?: boolean;\n\n  /**\n   * When true, navigates while replacing the current state in history.\n   *\n   * ```\n   * // Navigate to /view\n   * this.router.navigate(['/view'], { replaceUrl: true });\n   * ```\n   */\n  replaceUrl?: boolean;\n\n  /**\n   * Developer-defined state that can be passed to any navigation.\n   * Access this value through the `Navigation.extras` object\n   * returned from the [Router.getCurrentNavigation()\n   * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\n   *\n   * After a navigation completes, the router writes an object containing this\n   * value together with a `navigationId` to `history.state`.\n   * The value is written when `location.go()` or `location.replaceState()`\n   * is called before activating this route.\n   *\n   * Note that `history.state` does not pass an object equality test because\n   * the router adds the `navigationId` on each navigation.\n   *\n   */\n  state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed or interpreted.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n * @see UrlCreationOptions\n * @see NavigationBehaviorOptions\n *\n * @publicApi\n */\nexport interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {}\n\n/**\n * Error handler that is invoked when a navigation error occurs.\n *\n * If the handler returns a value, the navigation Promise is resolved with this value.\n * If the handler throws an exception, the navigation Promise is rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n  throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n    error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n  return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n  [k: string]: any,\n  // TODO(#27607): Remove `navigationId` and `ɵrouterPageId` and move to `ng` or `ɵ` namespace.\n  navigationId: number,\n  // The `ɵ` prefix is there to reduce the chance of colliding with any existing user properties on\n  // the history state.\n  ɵrouterPageId?: number,\n};\n\n/**\n * Information about a navigation operation.\n * Retrieve the most recent navigation object with the\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\n *\n * * *id* : The unique identifier of the current navigation.\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\n * This is the value before the router has parsed or applied redirects to it.\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\n * * *finalUrl* : The extracted URL after redirects have been applied.\n * This URL may not be available immediately, therefore this property can be `undefined`.\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\n * * *trigger* : Identifies how this navigation was triggered.\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n * -- 'popstate'--Triggered by a popstate event.\n * -- 'hashchange'--Triggered by a hashchange event.\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\n * navigation.\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\n * own `previousNavigation`.\n *\n * @publicApi\n */\nexport interface Navigation {\n  /**\n   * The unique identifier of the current navigation.\n   */\n  id: number;\n  /**\n   * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\n   * the value before the router has parsed or applied redirects to it.\n   */\n  initialUrl: string|UrlTree;\n  /**\n   * The initial target URL after being parsed with `UrlSerializer.extract()`.\n   */\n  extractedUrl: UrlTree;\n  /**\n   * The extracted URL after redirects have been applied.\n   * This URL may not be available immediately, therefore this property can be `undefined`.\n   * It is guaranteed to be set after the `RoutesRecognized` event fires.\n   */\n  finalUrl?: UrlTree;\n  /**\n   * Identifies how this navigation was triggered.\n   *\n   * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n   * * 'popstate'--Triggered by a popstate event.\n   * * 'hashchange'--Triggered by a hashchange event.\n   */\n  trigger: 'imperative'|'popstate'|'hashchange';\n  /**\n   * Options that controlled the strategy used for this navigation.\n   * See `NavigationExtras`.\n   */\n  extras: NavigationExtras;\n  /**\n   * The previously successful `Navigation` object. Only one previous navigation\n   * is available, therefore this previous `Navigation` object has a `null` value\n   * for its own `previousNavigation`.\n   */\n  previousNavigation: Navigation|null;\n}\n\nexport type NavigationTransition = {\n  id: number,\n  targetPageId: number,\n  currentUrlTree: UrlTree,\n  currentRawUrl: UrlTree,\n  extractedUrl: UrlTree,\n  urlAfterRedirects: UrlTree,\n  rawUrl: UrlTree,\n  extras: NavigationExtras,\n  resolve: any,\n  reject: any,\n  promise: Promise<boolean>,\n  source: NavigationTrigger,\n  restoredState: RestoredState|null,\n  currentSnapshot: RouterStateSnapshot,\n  targetSnapshot: RouterStateSnapshot|null,\n  currentRouterState: RouterState,\n  targetRouterState: RouterState|null,\n  guards: Checks,\n  guardsResult: boolean|UrlTree|null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}): Observable<void> {\n  return of(null) as any;\n}\n\n/**\n * Information related to a location change, necessary for scheduling follow-up Router navigations.\n */\ntype LocationChangeInfo = {\n  source: 'popstate'|'hashchange',\n  urlTree: UrlTree,\n  state: RestoredState|null,\n  transitionId: number\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nexport const exactMatchOptions: IsActiveMatchOptions = {\n  paths: 'exact',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'exact'\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nexport const subsetMatchOptions: IsActiveMatchOptions = {\n  paths: 'subset',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'subset'\n};\n\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Injectable()\nexport class Router {\n  /**\n   * Represents the activated `UrlTree` that the `Router` is configured to handle (through\n   * `UrlHandlingStrategy`). That is, after we find the route config tree that we're going to\n   * activate, run guards, and are just about to activate the route, we set the currentUrlTree.\n   *\n   * This should match the `browserUrlTree` when a navigation succeeds. If the\n   * `UrlHandlingStrategy.shouldProcessUrl` is `false`, only the `browserUrlTree` is updated.\n   */\n  private currentUrlTree: UrlTree;\n  /**\n   * Meant to represent the entire browser url after a successful navigation. In the life of a\n   * navigation transition:\n   * 1. The rawUrl represents the full URL that's being navigated to\n   * 2. We apply redirects, which might only apply to _part_ of the URL (due to\n   * `UrlHandlingStrategy`).\n   * 3. Right before activation (because we assume activation will succeed), we update the\n   * rawUrlTree to be a combination of the urlAfterRedirects (again, this might only apply to part\n   * of the initial url) and the rawUrl of the transition (which was the original navigation url in\n   * its full form).\n   */\n  private rawUrlTree: UrlTree;\n  /**\n   * Meant to represent the part of the browser url that the `Router` is set up to handle (via the\n   * `UrlHandlingStrategy`). This value is updated immediately after the browser url is updated (or\n   * the browser url update is skipped via `skipLocationChange`). With that, note that\n   * `browserUrlTree` _may not_ reflect the actual browser URL for two reasons:\n   *\n   * 1. `UrlHandlingStrategy` only handles part of the URL\n   * 2. `skipLocationChange` does not update the browser url.\n   *\n   * So to reiterate, `browserUrlTree` only represents the Router's internal understanding of the\n   * current route, either before guards with `urlUpdateStrategy === 'eager'` or right before\n   * activation with `'deferred'`.\n   *\n   * This should match the `currentUrlTree` when the navigation succeeds.\n   */\n  private browserUrlTree: UrlTree;\n  private readonly transitions: BehaviorSubject<NavigationTransition>;\n  private navigations: Observable<NavigationTransition>;\n  private lastSuccessfulNavigation: Navigation|null = null;\n  private currentNavigation: Navigation|null = null;\n  private disposed = false;\n\n  private locationSubscription?: SubscriptionLike;\n  /**\n   * Tracks the previously seen location change from the location subscription so we can compare\n   * the two latest to see if they are duplicates. See setUpLocationChangeListener.\n   */\n  private lastLocationChangeInfo: LocationChangeInfo|null = null;\n  private navigationId: number = 0;\n\n  /**\n   * The id of the currently active page in the router.\n   * Updated to the transition's target id on a successful navigation.\n   *\n   * This is used to track what page the router last activated. When an attempted navigation fails,\n   * the router can then use this to compute how to restore the state back to the previously active\n   * page.\n   */\n  private currentPageId: number = 0;\n  /**\n   * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n   * important for computing the target page id for new navigations because we need to ensure each\n   * page id in the browser history is 1 more than the previous entry.\n   */\n  private get browserPageId(): number|undefined {\n    return (this.location.getState() as RestoredState | null)?.ɵrouterPageId;\n  }\n  private configLoader: RouterConfigLoader;\n  private ngModule: NgModuleRef<any>;\n  private console: Console;\n  private isNgZoneEnabled: boolean = false;\n\n  /**\n   * An event stream for routing events in this NgModule.\n   */\n  public readonly events: Observable<Event> = new Subject<Event>();\n  /**\n   * The current state of routing in this NgModule.\n   */\n  public readonly routerState: RouterState;\n\n  /**\n   * A handler for navigation errors in this NgModule.\n   */\n  errorHandler: ErrorHandler = defaultErrorHandler;\n\n  /**\n   * A handler for errors thrown by `Router.parseUrl(url)`\n   * when `url` contains an invalid character.\n   * The most common case is a `%` sign\n   * that's not encoded and is not part of a percent encoded sequence.\n   */\n  malformedUriErrorHandler:\n      (error: URIError, urlSerializer: UrlSerializer,\n       url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n  /**\n   * True if at least one navigation event has occurred,\n   * false otherwise.\n   */\n  navigated: boolean = false;\n  private lastSuccessfulId: number = -1;\n\n  /**\n   * Hooks that enable you to pause navigation,\n   * either before or after the preactivation phase.\n   * Used by `RouterModule`.\n   *\n   * @internal\n   */\n  hooks: {\n    beforePreactivation: RouterHook,\n    afterPreactivation: RouterHook\n  } = {beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook};\n\n  /**\n   * A strategy for extracting and merging URLs.\n   * Used for AngularJS to Angular migrations.\n   */\n  urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n  /**\n   * A strategy for re-using routes.\n   */\n  routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n  /**\n   * How to handle a navigation request to the current URL. One of:\n   *\n   * - `'ignore'` :  The router ignores the request.\n   * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\n   *\n   * Note that this only configures whether the Route reprocesses the URL and triggers related\n   * action and events like redirects, guards, and resolvers. By default, the router re-uses a\n   * component instance when it re-navigates to the same component type without visiting a different\n   * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload\n   * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`\n   * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.\n   */\n  onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n  /**\n   * How to merge parameters, data, and resolved data from parent to child\n   * routes. One of:\n   *\n   * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n   * for path-less or component-less routes.\n   * - `'always'` : Inherit parent parameters, data, and resolved data\n   * for all child routes.\n   */\n  paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n  /**\n   * Determines when the router updates the browser URL.\n   * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n   * Set to `'eager'` to update the browser URL at the beginning of navigation.\n   * You can choose to update early so that, if navigation fails,\n   * you can show an error message with the URL that failed.\n   */\n  urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * @see `RouterModule`\n   */\n  relativeLinkResolution: 'legacy'|'corrected' = 'corrected';\n\n  /**\n   * Configures how the Router attempts to restore state when a navigation is cancelled.\n   *\n   * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n   * router before the navigation started.\n   *\n   * 'computed' - Will always return to the same state that corresponds to the actual Angular route\n   * when the navigation gets cancelled right after triggering a `popstate` event.\n   *\n   * The default value is `replace`\n   *\n   * @internal\n   */\n  // TODO(atscott): Determine how/when/if to make this public API\n  // This shouldn’t be an option at all but may need to be in order to allow migration without a\n  // breaking change. We need to determine if it should be made into public api (or if we forgo\n  // the option and release as a breaking change bug fix in a major version).\n  canceledNavigationResolution: 'replace'|'computed' = 'replace';\n\n  /**\n   * Creates the router service.\n   */\n  // TODO: vsavkin make internal after the final is out.\n  constructor(\n      private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n      private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n      loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n    const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n    const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.ngModule = injector.get(NgModuleRef);\n    this.console = injector.get(Console);\n    const ngZone = injector.get(NgZone);\n    this.isNgZoneEnabled = ngZone instanceof NgZone && NgZone.isInAngularZone();\n\n    this.resetConfig(config);\n    this.currentUrlTree = createEmptyUrlTree();\n    this.rawUrlTree = this.currentUrlTree;\n    this.browserUrlTree = this.currentUrlTree;\n\n    this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n    this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n    this.transitions = new BehaviorSubject<NavigationTransition>({\n      id: 0,\n      targetPageId: 0,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.currentUrlTree,\n      extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      rawUrl: this.currentUrlTree,\n      extras: {},\n      resolve: null,\n      reject: null,\n      promise: Promise.resolve(true),\n      source: 'imperative',\n      restoredState: null,\n      currentSnapshot: this.routerState.snapshot,\n      targetSnapshot: null,\n      currentRouterState: this.routerState,\n      targetRouterState: null,\n      guards: {canActivateChecks: [], canDeactivateChecks: []},\n      guardsResult: null,\n    });\n    this.navigations = this.setupNavigations(this.transitions);\n\n    this.processNavigations();\n  }\n\n  private setupNavigations(transitions: Observable<NavigationTransition>):\n      Observable<NavigationTransition> {\n    const eventsSubject = (this.events as Subject<Event>);\n    return transitions.pipe(\n               filter(t => t.id !== 0),\n\n               // Extract URL\n               map(t =>\n                       ({...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)} as\n                        NavigationTransition)),\n\n               // Using switchMap so we cancel executing navigations when a new one comes in\n               switchMap(t => {\n                 let completed = false;\n                 let errored = false;\n                 return of(t).pipe(\n                     // Store the Navigation object\n                     tap(t => {\n                       this.currentNavigation = {\n                         id: t.id,\n                         initialUrl: t.currentRawUrl,\n                         extractedUrl: t.extractedUrl,\n                         trigger: t.source,\n                         extras: t.extras,\n                         previousNavigation: this.lastSuccessfulNavigation ?\n                             {...this.lastSuccessfulNavigation, previousNavigation: null} :\n                             null\n                       };\n                     }),\n                     switchMap(t => {\n                       const browserUrlTree = this.browserUrlTree.toString();\n                       const urlTransition = !this.navigated ||\n                           t.extractedUrl.toString() !== browserUrlTree ||\n                           // Navigations which succeed or ones which fail and are cleaned up\n                           // correctly should result in `browserUrlTree` and `currentUrlTree`\n                           // matching. If this is not the case, assume something went wrong and try\n                           // processing the URL again.\n                           browserUrlTree !== this.currentUrlTree.toString();\n                       const processCurrentUrl =\n                           (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n                           this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n\n                       if (processCurrentUrl) {\n                         // If the source of the navigation is from a browser event, the URL is\n                         // already updated. We already need to sync the internal state.\n                         if (isBrowserTriggeredNavigation(t.source)) {\n                           this.browserUrlTree = t.extractedUrl;\n                         }\n                         return of(t).pipe(\n                             // Fire NavigationStart event\n                             switchMap(t => {\n                               const transition = this.transitions.getValue();\n                               eventsSubject.next(new NavigationStart(\n                                   t.id, this.serializeUrl(t.extractedUrl), t.source,\n                                   t.restoredState));\n                               if (transition !== this.transitions.getValue()) {\n                                 return EMPTY;\n                               }\n\n                               // This delay is required to match old behavior that forced\n                               // navigation to always be async\n                               return Promise.resolve(t);\n                             }),\n\n                             // ApplyRedirects\n                             applyRedirects(\n                                 this.ngModule.injector, this.configLoader, this.urlSerializer,\n                                 this.config),\n\n                             // Update the currentNavigation\n                             tap(t => {\n                               this.currentNavigation = {\n                                 ...this.currentNavigation!,\n                                 finalUrl: t.urlAfterRedirects\n                               };\n                             }),\n\n                             // Recognize\n                             recognize(\n                                 this.rootComponentType, this.config,\n                                 (url) => this.serializeUrl(url), this.paramsInheritanceStrategy,\n                                 this.relativeLinkResolution),\n\n                             // Update URL if in `eager` update mode\n                             tap(t => {\n                               if (this.urlUpdateStrategy === 'eager') {\n                                 if (!t.extras.skipLocationChange) {\n                                   this.setBrowserUrl(t.urlAfterRedirects, t);\n                                   // TODO(atscott): The above line is incorrect. It sets the url to\n                                   // only the part that is handled by the router. It should merge\n                                   // that with the rawUrl so the url includes segments not handled\n                                   // by the router:\n                                   //  const rawUrl = this.urlHandlingStrategy.merge(\n                                   //      t.urlAfterRedirects, t.rawUrl);\n                                   //  this.setBrowserUrl(rawUrl, t);\n                                 }\n                                 this.browserUrlTree = t.urlAfterRedirects;\n                               }\n\n                               // Fire RoutesRecognized\n                               const routesRecognized = new RoutesRecognized(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               eventsSubject.next(routesRecognized);\n                             }));\n                       } else {\n                         const processPreviousUrl = urlTransition && this.rawUrlTree &&\n                             this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n                         /* When the current URL shouldn't be processed, but the previous one was,\n                          * we handle this \"error condition\" by navigating to the previously\n                          * successful URL, but leaving the URL intact.*/\n                         if (processPreviousUrl) {\n                           const {id, extractedUrl, source, restoredState, extras} = t;\n                           const navStart = new NavigationStart(\n                               id, this.serializeUrl(extractedUrl), source, restoredState);\n                           eventsSubject.next(navStart);\n                           const targetSnapshot =\n                               createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n                           return of({\n                             ...t,\n                             targetSnapshot,\n                             urlAfterRedirects: extractedUrl,\n                             extras: {...extras, skipLocationChange: false, replaceUrl: false},\n                           });\n                         } else {\n                           /* When neither the current or previous URL can be processed, do nothing\n                            * other than update router's internal reference to the current \"settled\"\n                            * URL. This way the next navigation will be coming from the current URL\n                            * in the browser.\n                            */\n                           this.rawUrlTree = t.rawUrl;\n                           this.browserUrlTree = t.urlAfterRedirects;\n                           t.resolve(null);\n                           return EMPTY;\n                         }\n                       }\n                     }),\n\n                     // Before Preactivation\n                     switchTap(t => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.beforePreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     // --- GUARDS ---\n                     tap(t => {\n                       const guardsStart = new GuardsCheckStart(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                       this.triggerEvent(guardsStart);\n                     }),\n\n                     map(t => ({\n                           ...t,\n                           guards: getAllRouteGuards(\n                               t.targetSnapshot!, t.currentSnapshot, this.rootContexts)\n                         })),\n\n                     checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n                     tap(t => {\n                       if (isUrlTree(t.guardsResult)) {\n                         const error: Error&{url?: UrlTree} = navigationCancelingError(\n                             `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n                         error.url = t.guardsResult;\n                         throw error;\n                       }\n\n                       const guardsEnd = new GuardsCheckEnd(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!,\n                           !!t.guardsResult);\n                       this.triggerEvent(guardsEnd);\n                     }),\n\n                     filter(t => {\n                       if (!t.guardsResult) {\n                         this.restoreHistory(t);\n                         this.cancelNavigationTransition(t, '');\n                         return false;\n                       }\n                       return true;\n                     }),\n\n                     // --- RESOLVE ---\n                     switchTap(t => {\n                       if (t.guards.canActivateChecks.length) {\n                         return of(t).pipe(\n                             tap(t => {\n                               const resolveStart = new ResolveStart(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveStart);\n                             }),\n                             switchMap(t => {\n                               let dataResolved = false;\n                               return of(t).pipe(\n                                   resolveData(\n                                       this.paramsInheritanceStrategy, this.ngModule.injector),\n                                   tap({\n                                     next: () => dataResolved = true,\n                                     complete: () => {\n                                       if (!dataResolved) {\n                                         this.restoreHistory(t);\n                                         this.cancelNavigationTransition(\n                                             t,\n                                             `At least one route resolver didn't emit any value.`);\n                                       }\n                                     }\n                                   }),\n                               );\n                             }),\n                             tap(t => {\n                               const resolveEnd = new ResolveEnd(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveEnd);\n                             }));\n                       }\n                       return undefined;\n                     }),\n\n                     // --- AFTER PREACTIVATION ---\n                     switchTap((t: NavigationTransition) => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.afterPreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     map((t: NavigationTransition) => {\n                       const targetRouterState = createRouterState(\n                           this.routeReuseStrategy, t.targetSnapshot!, t.currentRouterState);\n                       return ({...t, targetRouterState});\n                     }),\n\n                     /* Once here, we are about to activate syncronously. The assumption is this\n                        will succeed, and user code may read from the Router service. Therefore\n                        before activation, we need to update router properties storing the current\n                        URL and the RouterState, as well as updated the browser URL. All this should\n                        happen *before* activating. */\n                     tap((t: NavigationTransition) => {\n                       this.currentUrlTree = t.urlAfterRedirects;\n                       this.rawUrlTree =\n                           this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n\n                       (this as {routerState: RouterState}).routerState = t.targetRouterState!;\n\n                       if (this.urlUpdateStrategy === 'deferred') {\n                         if (!t.extras.skipLocationChange) {\n                           this.setBrowserUrl(this.rawUrlTree, t);\n                         }\n                         this.browserUrlTree = t.urlAfterRedirects;\n                       }\n                     }),\n\n                     activateRoutes(\n                         this.rootContexts, this.routeReuseStrategy,\n                         (evt: Event) => this.triggerEvent(evt)),\n\n                     tap({\n                       next() {\n                         completed = true;\n                       },\n                       complete() {\n                         completed = true;\n                       }\n                     }),\n                     finalize(() => {\n                       /* When the navigation stream finishes either through error or success, we\n                        * set the `completed` or `errored` flag. However, there are some situations\n                        * where we could get here without either of those being set. For instance, a\n                        * redirect during NavigationStart. Therefore, this is a catch-all to make\n                        * sure the NavigationCancel\n                        * event is fired when a navigation gets cancelled but not caught by other\n                        * means. */\n                       if (!completed && !errored) {\n                         const cancelationReason = `Navigation ID ${\n                             t.id} is not equal to the current navigation id ${this.navigationId}`;\n                         if (this.canceledNavigationResolution === 'replace') {\n                           // Must reset to current URL tree here to ensure history.state is set. On\n                           // a fresh page load, if a new navigation comes in before a successful\n                           // navigation completes, there will be nothing in\n                           // history.state.navigationId. This can cause sync problems with\n                           // AngularJS sync code which looks for a value here in order to determine\n                           // whether or not to handle a given popstate event or to leave it to the\n                           // Angular router.\n                           this.restoreHistory(t);\n                           this.cancelNavigationTransition(t, cancelationReason);\n                         } else {\n                           // We cannot trigger a `location.historyGo` if the\n                           // cancellation was due to a new navigation before the previous could\n                           // complete. This is because `location.historyGo` triggers a `popstate`\n                           // which would also trigger another navigation. Instead, treat this as a\n                           // redirect and do not reset the state.\n                           this.cancelNavigationTransition(t, cancelationReason);\n                           // TODO(atscott): The same problem happens here with a fresh page load\n                           // and a new navigation before that completes where we won't set a page\n                           // id.\n                         }\n                       }\n                       // Only clear current navigation if it is still set to the one that\n                       // finalized.\n                       if (this.currentNavigation?.id === t.id) {\n                         this.currentNavigation = null;\n                       }\n                     }),\n                     catchError((e) => {\n                       // TODO(atscott): The NavigationTransition `t` used here does not accurately\n                       // reflect the current state of the whole transition because some operations\n                       // return a new object rather than modifying the one in the outermost\n                       // `switchMap`.\n                       //  The fix can likely be to:\n                       //  1. Rename the outer `t` variable so it's not shadowed all the time and\n                       //  confusing\n                       //  2. Keep reassigning to the outer variable after each stage to ensure it\n                       //  gets updated. Or change the implementations to not return a copy.\n                       // Not changed yet because it affects existing code and would need to be\n                       // tested more thoroughly.\n                       errored = true;\n                       /* This error type is issued during Redirect, and is handled as a\n                        * cancellation rather than an error. */\n                       if (isNavigationCancelingError(e)) {\n                         const redirecting = isUrlTree(e.url);\n                         if (!redirecting) {\n                           // Set property only if we're not redirecting. If we landed on a page and\n                           // redirect to `/` route, the new navigation is going to see the `/`\n                           // isn't a change from the default currentUrlTree and won't navigate.\n                           // This is only applicable with initial navigation, so setting\n                           // `navigated` only when not redirecting resolves this scenario.\n                           this.navigated = true;\n                           this.restoreHistory(t, true);\n                         }\n                         const navCancel = new NavigationCancel(\n                             t.id, this.serializeUrl(t.extractedUrl), e.message);\n                         eventsSubject.next(navCancel);\n\n                         // When redirecting, we need to delay resolving the navigation\n                         // promise and push it to the redirect navigation\n                         if (!redirecting) {\n                           t.resolve(false);\n                         } else {\n                           // setTimeout is required so this navigation finishes with\n                           // the return EMPTY below. If it isn't allowed to finish\n                           // processing, there can be multiple navigations to the same\n                           // URL.\n                           setTimeout(() => {\n                             const mergedTree =\n                                 this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);\n                             const extras = {\n                               skipLocationChange: t.extras.skipLocationChange,\n                               // The URL is already updated at this point if we have 'eager' URL\n                               // updates or if the navigation was triggered by the browser (back\n                               // button, URL bar, etc). We want to replace that item in history if\n                               // the navigation is rejected.\n                               replaceUrl: this.urlUpdateStrategy === 'eager' ||\n                                   isBrowserTriggeredNavigation(t.source)\n                             };\n\n                             this.scheduleNavigation(\n                                 mergedTree, 'imperative', null, extras,\n                                 {resolve: t.resolve, reject: t.reject, promise: t.promise});\n                           }, 0);\n                         }\n\n                         /* All other errors should reset to the router's internal URL reference to\n                          * the pre-error state. */\n                       } else {\n                         this.restoreHistory(t, true);\n                         const navError =\n                             new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n                         eventsSubject.next(navError);\n                         try {\n                           t.resolve(this.errorHandler(e));\n                         } catch (ee) {\n                           t.reject(ee);\n                         }\n                       }\n                       return EMPTY;\n                     }));\n                 // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n               })) as any as Observable<NavigationTransition>;\n  }\n\n  /**\n   * @internal\n   * TODO: this should be removed once the constructor of the router made internal\n   */\n  resetRootComponentType(rootComponentType: Type<any>): void {\n    this.rootComponentType = rootComponentType;\n    // TODO: vsavkin router 4.0 should make the root component set to null\n    // this will simplify the lifecycle of the router.\n    this.routerState.root.component = this.rootComponentType;\n  }\n\n  private getTransition(): NavigationTransition {\n    const transition = this.transitions.value;\n    // TODO(atscott): This comment doesn't make it clear why this value needs to be set. In the case\n    // described below (where we don't handle previous or current url), the `browserUrlTree` is set\n    // to the `urlAfterRedirects` value. However, these values *are already the same* because of the\n    // line below. So it seems that we should be able to remove the line below and the line where\n    // `browserUrlTree` is updated when we aren't handling any part of the navigation url.\n    // Run TGP to confirm that this can be done.\n\n    // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n    // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n    // processing the previous URL.\n    transition.urlAfterRedirects = this.browserUrlTree;\n    return transition;\n  }\n\n  private setTransition(t: Partial<NavigationTransition>): void {\n    this.transitions.next({...this.getTransition(), ...t});\n  }\n\n  /**\n   * Sets up the location change listener and performs the initial navigation.\n   */\n  initialNavigation(): void {\n    this.setUpLocationChangeListener();\n    if (this.navigationId === 0) {\n      this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n    }\n  }\n\n  /**\n   * Sets up the location change listener. This listener detects navigations triggered from outside\n   * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n   * navigation so that the correct events, guards, etc. are triggered.\n   */\n  setUpLocationChangeListener(): void {\n    // Don't need to use Zone.wrap any more, because zone.js\n    // already patch onPopState, so location change callback will\n    // run into ngZone\n    if (!this.locationSubscription) {\n      this.locationSubscription = this.location.subscribe(event => {\n        const currentChange = this.extractLocationChangeInfoFromEvent(event);\n        // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n        // hybrid apps.\n        if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) {\n          setTimeout(() => {\n            const {source, state, urlTree} = currentChange;\n            const extras: NavigationExtras = {replaceUrl: true};\n            if (state) {\n              const stateCopy = {...state} as Partial<RestoredState>;\n              delete stateCopy.navigationId;\n              delete stateCopy.ɵrouterPageId;\n              if (Object.keys(stateCopy).length !== 0) {\n                extras.state = stateCopy;\n              }\n            }\n            this.scheduleNavigation(urlTree, source, state, extras);\n          }, 0);\n        }\n        this.lastLocationChangeInfo = currentChange;\n      });\n    }\n  }\n\n  /** Extracts router-related information from a `PopStateEvent`. */\n  private extractLocationChangeInfoFromEvent(change: PopStateEvent): LocationChangeInfo {\n    return {\n      source: change['type'] === 'popstate' ? 'popstate' : 'hashchange',\n      urlTree: this.parseUrl(change['url']!),\n      // Navigations coming from Angular router have a navigationId state\n      // property. When this exists, restore the state.\n      state: change.state?.navigationId ? change.state : null,\n      transitionId: this.getTransition().id\n    } as const;\n  }\n\n  /**\n   * Determines whether two events triggered by the Location subscription are due to the same\n   * navigation. The location subscription can fire two events (popstate and hashchange) for a\n   * single navigation. The second one should be ignored, that is, we should not schedule another\n   * navigation in the Router.\n   */\n  private shouldScheduleNavigation(previous: LocationChangeInfo|null, current: LocationChangeInfo):\n      boolean {\n    if (!previous) return true;\n\n    const sameDestination = current.urlTree.toString() === previous.urlTree.toString();\n    const eventsOccurredAtSameTime = current.transitionId === previous.transitionId;\n    if (!eventsOccurredAtSameTime || !sameDestination) {\n      return true;\n    }\n\n    if ((current.source === 'hashchange' && previous.source === 'popstate') ||\n        (current.source === 'popstate' && previous.source === 'hashchange')) {\n      return false;\n    }\n\n    return true;\n  }\n\n  /** The current URL. */\n  get url(): string {\n    return this.serializeUrl(this.currentUrlTree);\n  }\n\n  /**\n   * Returns the current `Navigation` object when the router is navigating,\n   * and `null` when idle.\n   */\n  getCurrentNavigation(): Navigation|null {\n    return this.currentNavigation;\n  }\n\n  /** @internal */\n  triggerEvent(event: Event): void {\n    (this.events as Subject<Event>).next(event);\n  }\n\n  /**\n   * Resets the route configuration used for navigation and generating links.\n   *\n   * @param config The route array for the new configuration.\n   *\n   * @usageNotes\n   *\n   * ```\n   * router.resetConfig([\n   *  { path: 'team/:id', component: TeamCmp, children: [\n   *    { path: 'simple', component: SimpleCmp },\n   *    { path: 'user/:name', component: UserCmp }\n   *  ]}\n   * ]);\n   * ```\n   */\n  resetConfig(config: Routes): void {\n    validateConfig(config);\n    this.config = config.map(standardizeConfig);\n    this.navigated = false;\n    this.lastSuccessfulId = -1;\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.dispose();\n  }\n\n  /** Disposes of the router. */\n  dispose(): void {\n    this.transitions.complete();\n    if (this.locationSubscription) {\n      this.locationSubscription.unsubscribe();\n      this.locationSubscription = undefined;\n    }\n    this.disposed = true;\n  }\n\n  /**\n   * Appends URL segments to the current URL tree to create a new URL tree.\n   *\n   * @param commands An array of URL fragments with which to construct the new URL tree.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\n   * property of the options object, if supplied.\n   * @param navigationExtras Options that control the navigation strategy.\n   * @returns The new URL tree.\n   *\n   * @usageNotes\n   *\n   * ```\n   * // create /team/33/user/11\n   * router.createUrlTree(['/team', 33, 'user', 11]);\n   *\n   * // create /team/33;expand=true/user/11\n   * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n   *\n   * // you can collapse static segments like this (this works only with the first passed-in value):\n   * router.createUrlTree(['/team/33/user', userId]);\n   *\n   * // If the first segment can contain slashes, and you do not want the router to split it,\n   * // you can do the following:\n   * router.createUrlTree([{segmentPath: '/one/two'}]);\n   *\n   * // create /team/33/(user/11//right:chat)\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n   *\n   * // remove the right secondary node\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n   *\n   * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n   *\n   * // navigate to /team/33/user/11/details\n   * router.createUrlTree(['details'], {relativeTo: route});\n   *\n   * // navigate to /team/33/user/22\n   * router.createUrlTree(['../22'], {relativeTo: route});\n   *\n   * // navigate to /team/44/user/22\n   * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n   *\n   * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n   * tree should be created relative to the root.\n   * ```\n   */\n  createUrlTree(commands: any[], navigationExtras: UrlCreationOptions = {}): UrlTree {\n    const {relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment} =\n        navigationExtras;\n    const a = relativeTo || this.routerState.root;\n    const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n    let q: Params|null = null;\n    switch (queryParamsHandling) {\n      case 'merge':\n        q = {...this.currentUrlTree.queryParams, ...queryParams};\n        break;\n      case 'preserve':\n        q = this.currentUrlTree.queryParams;\n        break;\n      default:\n        q = queryParams || null;\n    }\n    if (q !== null) {\n      q = this.removeEmptyProps(q);\n    }\n    return createUrlTree(a, this.currentUrlTree, commands, q, f ?? null);\n  }\n\n  /**\n   * Navigates to a view using an absolute route path.\n   *\n   * @param url An absolute path for a defined route. The function does not apply any delta to the\n   *     current URL.\n   * @param extras An object containing properties that modify the navigation strategy.\n   *\n   * @returns A Promise that resolves to 'true' when navigation succeeds,\n   * to 'false' when navigation fails, or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to an absolute path.\n   *\n   * ```\n   * router.navigateByUrl(\"/team/33/user/11\");\n   *\n   * // Navigate without updating the URL\n   * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigateByUrl(url: string|UrlTree, extras: NavigationBehaviorOptions = {\n    skipLocationChange: false\n  }): Promise<boolean> {\n    if (typeof ngDevMode === 'undefined' ||\n        ngDevMode && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n      this.console.warn(\n          `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n    }\n\n    const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n    const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n    return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n  }\n\n  /**\n   * Navigate based on the provided array of commands and a starting point.\n   * If no starting route is provided, the navigation is absolute.\n   *\n   * @param commands An array of URL fragments with which to construct the target URL.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\n   * of the options object, if supplied.\n   * @param extras An options object that determines how the URL should be constructed or\n   *     interpreted.\n   *\n   * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\n   *     fails,\n   * or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to a dynamic route path relative to the current URL.\n   *\n   * ```\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n   *\n   * // Navigate without updating the URL, overriding the default behavior\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    validateCommands(commands);\n    return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n  }\n\n  /** Serializes a `UrlTree` into a string */\n  serializeUrl(url: UrlTree): string {\n    return this.urlSerializer.serialize(url);\n  }\n\n  /** Parses a string into a `UrlTree` */\n  parseUrl(url: string): UrlTree {\n    let urlTree: UrlTree;\n    try {\n      urlTree = this.urlSerializer.parse(url);\n    } catch (e) {\n      urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n    }\n    return urlTree;\n  }\n\n  /**\n   * Returns whether the url is activated.\n   *\n   * @deprecated\n   * Use `IsActiveMatchOptions` instead.\n   *\n   * - The equivalent `IsActiveMatchOptions` for `true` is\n   * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.\n   * - The equivalent for `false` is\n   * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.\n   */\n  isActive(url: string|UrlTree, exact: boolean): boolean;\n  /**\n   * Returns whether the url is activated.\n   */\n  isActive(url: string|UrlTree, matchOptions: IsActiveMatchOptions): boolean;\n  /** @internal */\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean;\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean {\n    let options: IsActiveMatchOptions;\n    if (matchOptions === true) {\n      options = {...exactMatchOptions};\n    } else if (matchOptions === false) {\n      options = {...subsetMatchOptions};\n    } else {\n      options = matchOptions;\n    }\n    if (isUrlTree(url)) {\n      return containsTree(this.currentUrlTree, url, options);\n    }\n\n    const urlTree = this.parseUrl(url);\n    return containsTree(this.currentUrlTree, urlTree, options);\n  }\n\n  private removeEmptyProps(params: Params): Params {\n    return Object.keys(params).reduce((result: Params, key: string) => {\n      const value: any = params[key];\n      if (value !== null && value !== undefined) {\n        result[key] = value;\n      }\n      return result;\n    }, {});\n  }\n\n  private processNavigations(): void {\n    this.navigations.subscribe(\n        t => {\n          this.navigated = true;\n          this.lastSuccessfulId = t.id;\n          this.currentPageId = t.targetPageId;\n          (this.events as Subject<Event>)\n              .next(new NavigationEnd(\n                  t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n          this.lastSuccessfulNavigation = this.currentNavigation;\n          t.resolve(true);\n        },\n        e => {\n          this.console.warn(`Unhandled Navigation Error: ${e}`);\n        });\n  }\n\n  private scheduleNavigation(\n      rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n      extras: NavigationExtras,\n      priorPromise?: {resolve: any, reject: any, promise: Promise<boolean>}): Promise<boolean> {\n    if (this.disposed) {\n      return Promise.resolve(false);\n    }\n\n    // * Imperative navigations (router.navigate) might trigger additional navigations to the same\n    //   URL via a popstate event and the locationChangeListener. We should skip these duplicate\n    //   navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router\n    //   states.\n    // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If\n    //   the user follows that with a navigation using the back/forward button or manual URL change,\n    //   the destination may be the same as the previous imperative attempt. We should not skip\n    //   these navigations because it's a separate case from the one above -- it's not a duplicate\n    //   navigation.\n    const lastNavigation = this.getTransition();\n    // We don't want to skip duplicate successful navs if they're imperative because\n    // onSameUrlNavigation could be 'reload' (so the duplicate is intended).\n    const browserNavPrecededByRouterNav = isBrowserTriggeredNavigation(source) && lastNavigation &&\n        !isBrowserTriggeredNavigation(lastNavigation.source);\n    const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id;\n    // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison.\n    // However, if it failed, we should compare to the final result (urlAfterRedirects).\n    const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ?\n        lastNavigation.rawUrl :\n        lastNavigation.urlAfterRedirects;\n    const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();\n    if (browserNavPrecededByRouterNav && duplicateNav) {\n      return Promise.resolve(true);  // return value is not used\n    }\n\n    let resolve: any;\n    let reject: any;\n    let promise: Promise<boolean>;\n    if (priorPromise) {\n      resolve = priorPromise.resolve;\n      reject = priorPromise.reject;\n      promise = priorPromise.promise;\n\n    } else {\n      promise = new Promise<boolean>((res, rej) => {\n        resolve = res;\n        reject = rej;\n      });\n    }\n\n    const id = ++this.navigationId;\n    let targetPageId: number;\n    if (this.canceledNavigationResolution === 'computed') {\n      const isInitialPage = this.currentPageId === 0;\n      if (isInitialPage) {\n        restoredState = this.location.getState() as RestoredState | null;\n      }\n      // If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of\n      // `ɵrouterPageId`. This is the case for something like a page refresh where we assign the\n      // target id to the previously set value for that page.\n      if (restoredState && restoredState.ɵrouterPageId) {\n        targetPageId = restoredState.ɵrouterPageId;\n      } else {\n        // If we're replacing the URL or doing a silent navigation, we do not want to increment the\n        // page id because we aren't pushing a new entry to history.\n        if (extras.replaceUrl || extras.skipLocationChange) {\n          targetPageId = this.browserPageId ?? 0;\n        } else {\n          targetPageId = (this.browserPageId ?? 0) + 1;\n        }\n      }\n    } else {\n      // This is unused when `canceledNavigationResolution` is not computed.\n      targetPageId = 0;\n    }\n\n    this.setTransition({\n      id,\n      targetPageId,\n      source,\n      restoredState,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.rawUrlTree,\n      rawUrl,\n      extras,\n      resolve,\n      reject,\n      promise,\n      currentSnapshot: this.routerState.snapshot,\n      currentRouterState: this.routerState\n    });\n\n    // Make sure that the error is propagated even though `processNavigations` catch\n    // handler does not rethrow\n    return promise.catch((e: any) => {\n      return Promise.reject(e);\n    });\n  }\n\n  private setBrowserUrl(url: UrlTree, t: NavigationTransition) {\n    const path = this.urlSerializer.serialize(url);\n    const state = {...t.extras.state, ...this.generateNgRouterState(t.id, t.targetPageId)};\n    if (this.location.isCurrentPathEqualTo(path) || !!t.extras.replaceUrl) {\n      this.location.replaceState(path, '', state);\n    } else {\n      this.location.go(path, '', state);\n    }\n  }\n\n  /**\n   * Performs the necessary rollback action to restore the browser URL to the\n   * state before the transition.\n   */\n  private restoreHistory(t: NavigationTransition, restoringFromCaughtError = false) {\n    if (this.canceledNavigationResolution === 'computed') {\n      const targetPagePosition = this.currentPageId - t.targetPageId;\n      // The navigator change the location before triggered the browser event,\n      // so we need to go back to the current url if the navigation is canceled.\n      // Also, when navigation gets cancelled while using url update strategy eager, then we need to\n      // go back. Because, when `urlUpdateSrategy` is `eager`; `setBrowserUrl` method is called\n      // before any verification.\n      const browserUrlUpdateOccurred =\n          (t.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n           this.currentUrlTree === this.currentNavigation?.finalUrl);\n      if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n        this.location.historyGo(targetPagePosition);\n      } else if (\n          this.currentUrlTree === this.currentNavigation?.finalUrl && targetPagePosition === 0) {\n        // We got to the activation stage (where currentUrlTree is set to the navigation's\n        // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n        // We still need to reset the router state back to what it was when the navigation started.\n        this.resetState(t);\n        // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.\n        // Investigate if this can be done by running TGP.\n        this.browserUrlTree = t.currentUrlTree;\n        this.resetUrlToCurrentUrlTree();\n      } else {\n        // The browser URL and router state was not updated before the navigation cancelled so\n        // there's no restoration needed.\n      }\n    } else if (this.canceledNavigationResolution === 'replace') {\n      // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n      // for `deferred` navigations that haven't change the internal state yet because guards\n      // reject. For 'eager' navigations, it seems like we also really should reset the state\n      // because the navigation was cancelled. Investigate if this can be done by running TGP.\n      if (restoringFromCaughtError) {\n        this.resetState(t);\n      }\n      this.resetUrlToCurrentUrlTree();\n    }\n  }\n\n  private resetState(t: NavigationTransition): void {\n    (this as {routerState: RouterState}).routerState = t.currentRouterState;\n    this.currentUrlTree = t.currentUrlTree;\n    this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n  }\n\n  private resetUrlToCurrentUrlTree(): void {\n    this.location.replaceState(\n        this.urlSerializer.serialize(this.rawUrlTree), '',\n        this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n  }\n\n  private cancelNavigationTransition(t: NavigationTransition, reason: string) {\n    const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), reason);\n    this.triggerEvent(navCancel);\n    t.resolve(false);\n  }\n\n  private generateNgRouterState(navigationId: number, routerPageId?: number) {\n    if (this.canceledNavigationResolution === 'computed') {\n      return {navigationId, ɵrouterPageId: routerPageId};\n    }\n    return {navigationId};\n  }\n}\n\nfunction validateCommands(commands: string[]): void {\n  for (let i = 0; i < commands.length; i++) {\n    const cmd = commands[i];\n    if (cmd == null) {\n      throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n    }\n  }\n}\n\nfunction isBrowserTriggeredNavigation(source: 'imperative'|'popstate'|'hashchange') {\n  return source !== 'imperative';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {Params} from '../shared';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segements.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink implements OnChanges {\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private preserve!: boolean;\n\n  /** @internal */\n  onChanges = new Subject<RouterLink>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n    if (tabIndex == null) {\n      renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges) {\n    // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n    // to the RouterLinks it's tracking.\n    this.onChanges.next(this);\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  @HostListener('click')\n  onClick(): boolean {\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state,\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return true;\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @HostBinding('attr.target') @Input() target!: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private subscription: Subscription;\n  // TODO(issue/24571): remove '!'.\n  private preserve!: boolean;\n\n  // the url displayed on the anchor element.\n  // TODO(issue/24571): remove '!'.\n  @HostBinding() href!: string;\n\n  /** @internal */\n  onChanges = new Subject<RouterLinkWithHref>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      private locationStrategy: LocationStrategy) {\n    this.subscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.updateTargetUrlAndHref();\n      }\n    });\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): any {\n    this.updateTargetUrlAndHref();\n    this.onChanges.next(this);\n  }\n  /** @nodoc */\n  ngOnDestroy(): any {\n    this.subscription.unsubscribe();\n  }\n\n  /** @nodoc */\n  @HostListener(\n      'click',\n      ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'])\n  onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean):\n      boolean {\n    if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n      return true;\n    }\n\n    if (typeof this.target === 'string' && this.target != '_self') {\n      return true;\n    }\n\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return false;\n  }\n\n  private updateTargetUrlAndHref(): void {\n    this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\nfunction attrBoolValue(s: any): boolean {\n  return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, Optional, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {from, of, Subscription} from 'rxjs';\nimport {mergeAll} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {IsActiveMatchOptions} from '../url_tree';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLinkActive]',\n  exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n  @ContentChildren(RouterLink, {descendants: true}) links!: QueryList<RouterLink>;\n  @ContentChildren(RouterLinkWithHref, {descendants: true})\n  linksWithHrefs!: QueryList<RouterLinkWithHref>;\n\n  private classes: string[] = [];\n  private routerEventsSubscription: Subscription;\n  private linkInputChangesSubscription?: Subscription;\n  public readonly isActive: boolean = false;\n\n  /**\n   * Options to configure how to determine if the router link is active.\n   *\n   * These options are passed to the `Router.isActive()` function.\n   *\n   * @see Router.isActive\n   */\n  @Input() routerLinkActiveOptions: {exact: boolean}|IsActiveMatchOptions = {exact: false};\n\n\n  constructor(\n      private router: Router, private element: ElementRef, private renderer: Renderer2,\n      private readonly cdr: ChangeDetectorRef, @Optional() private link?: RouterLink,\n      @Optional() private linkWithHref?: RouterLinkWithHref) {\n    this.routerEventsSubscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.update();\n      }\n    });\n  }\n\n  /** @nodoc */\n  ngAfterContentInit(): void {\n    // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n    of(this.links.changes, this.linksWithHrefs.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n      this.update();\n      this.subscribeToEachLinkOnChanges();\n    });\n  }\n\n  private subscribeToEachLinkOnChanges() {\n    this.linkInputChangesSubscription?.unsubscribe();\n    const allLinkChanges =\n        [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref]\n            .filter((link): link is RouterLink|RouterLinkWithHref => !!link)\n            .map(link => link.onChanges);\n    this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n      if (this.isActive !== this.isLinkActive(this.router)(link)) {\n        this.update();\n      }\n    });\n  }\n\n  @Input()\n  set routerLinkActive(data: string[]|string) {\n    const classes = Array.isArray(data) ? data : data.split(' ');\n    this.classes = classes.filter(c => !!c);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    this.update();\n  }\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.routerEventsSubscription.unsubscribe();\n    this.linkInputChangesSubscription?.unsubscribe();\n  }\n\n  private update(): void {\n    if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n    Promise.resolve().then(() => {\n      const hasActiveLinks = this.hasActiveLinks();\n      if (this.isActive !== hasActiveLinks) {\n        (this as any).isActive = hasActiveLinks;\n        this.cdr.markForCheck();\n        this.classes.forEach((c) => {\n          if (hasActiveLinks) {\n            this.renderer.addClass(this.element.nativeElement, c);\n          } else {\n            this.renderer.removeClass(this.element.nativeElement, c);\n          }\n        });\n      }\n    });\n  }\n\n  private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n    const options: boolean|IsActiveMatchOptions =\n        isActiveMatchOptions(this.routerLinkActiveOptions) ?\n        this.routerLinkActiveOptions :\n        // While the types should disallow `undefined` here, it's possible without strict inputs\n        (this.routerLinkActiveOptions.exact || false);\n    return (link: RouterLink|RouterLinkWithHref) => router.isActive(link.urlTree, options);\n  }\n\n  private hasActiveLinks(): boolean {\n    const isActiveCheckFn = this.isLinkActive(this.router);\n    return this.link && isActiveCheckFn(this.link) ||\n        this.linkWithHref && isActiveCheckFn(this.linkWithHref) ||\n        this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);\n  }\n}\n\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options: {exact: boolean}|\n                              IsActiveMatchOptions): options is IsActiveMatchOptions {\n  return !!(options as IsActiveMatchOptions).paths;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef,} from '@angular/core';\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * An interface that defines the contract for developing a component outlet for the `Router`.\n *\n * An outlet acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * A router outlet should register itself with the `Router` via\n * `ChildrenOutletContexts#onChildOutletCreated` and unregister with\n * `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,\n * it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.\n *\n * @see `ChildrenOutletContexts`\n * @publicApi\n */\nexport interface RouterOutletContract {\n  /**\n   * Whether the given outlet is activated.\n   *\n   * An outlet is considered \"activated\" if it has an active component.\n   */\n  isActivated: boolean;\n\n  /** The instance of the activated component or `null` if the outlet is not activated. */\n  component: Object|null;\n\n  /**\n   * The `Data` of the `ActivatedRoute` snapshot.\n   */\n  activatedRouteData: Data;\n\n  /**\n   * The `ActivatedRoute` for the outlet or `null` if the outlet is not activated.\n   */\n  activatedRoute: ActivatedRoute|null;\n\n  /**\n   * Called by the `Router` when the outlet should activate (create a component).\n   */\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null): void;\n\n  /**\n   * A request to destroy the currently activated component.\n   *\n   * When a `RouteReuseStrategy` indicates that an `ActivatedRoute` should be removed but stored for\n   * later re-use rather than destroyed, the `Router` will call `detach` instead.\n   */\n  deactivate(): void;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree.\n   *\n   * This is similar to `deactivate`, but the activated component should _not_ be destroyed.\n   * Instead, it is returned so that it can be reattached later via the `attach` method.\n   */\n  detach(): ComponentRef<unknown>;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree.\n   */\n  attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;\n\n  /**\n   * Emits an activate event when a new component is instantiated\n   **/\n  activateEvents?: EventEmitter<unknown>;\n\n  /**\n   * Emits a deactivate event when a component is destroyed.\n   */\n  deactivateEvents?: EventEmitter<unknown>;\n}\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {\n  private activated: ComponentRef<any>|null = null;\n  private _activatedRoute: ActivatedRoute|null = null;\n  private name: string;\n\n  @Output('activate') activateEvents = new EventEmitter<any>();\n  @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n  constructor(\n      private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n      private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n      private changeDetector: ChangeDetectorRef) {\n    this.name = name || PRIMARY_OUTLET;\n    parentContexts.onChildOutletCreated(this.name, this);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.parentContexts.onChildOutletDestroyed(this.name);\n  }\n\n  /** @nodoc */\n  ngOnInit(): void {\n    if (!this.activated) {\n      // If the outlet was not instantiated at the time the route got activated we need to populate\n      // the outlet when it is initialized (ie inside a NgIf)\n      const context = this.parentContexts.getContext(this.name);\n      if (context && context.route) {\n        if (context.attachRef) {\n          // `attachRef` is populated when there is an existing component to mount\n          this.attach(context.attachRef, context.route);\n        } else {\n          // otherwise the component defined in the configuration is created\n          this.activateWith(context.route, context.resolver || null);\n        }\n      }\n    }\n  }\n\n  get isActivated(): boolean {\n    return !!this.activated;\n  }\n\n  /**\n   * @returns The currently activated component instance.\n   * @throws An error if the outlet is not activated.\n   */\n  get component(): Object {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this.activated.instance;\n  }\n\n  get activatedRoute(): ActivatedRoute {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this._activatedRoute as ActivatedRoute;\n  }\n\n  get activatedRouteData(): Data {\n    if (this._activatedRoute) {\n      return this._activatedRoute.snapshot.data;\n    }\n    return {};\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree\n   */\n  detach(): ComponentRef<any> {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    this.location.detach();\n    const cmp = this.activated;\n    this.activated = null;\n    this._activatedRoute = null;\n    return cmp;\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n   */\n  attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n    this.activated = ref;\n    this._activatedRoute = activatedRoute;\n    this.location.insert(ref.hostView);\n  }\n\n  deactivate(): void {\n    if (this.activated) {\n      const c = this.component;\n      this.activated.destroy();\n      this.activated = null;\n      this._activatedRoute = null;\n      this.deactivateEvents.emit(c);\n    }\n  }\n\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n    if (this.isActivated) {\n      throw new Error('Cannot activate an already activated outlet');\n    }\n    this._activatedRoute = activatedRoute;\n    const snapshot = activatedRoute._futureSnapshot;\n    const component = <any>snapshot.routeConfig!.component;\n    resolver = resolver || this.resolver;\n    const factory = resolver.resolveComponentFactory(component);\n    const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n    const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n    this.activated = this.location.createComponent(factory, this.location.length, injector);\n    // Calling `markForCheck` to make sure we will run the change detection when the\n    // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n    this.changeDetector.markForCheck();\n    this.activateEvents.emit(this.activated.instance);\n  }\n}\n\nclass OutletInjector implements Injector {\n  constructor(\n      private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n      private parent: Injector) {}\n\n  get(token: any, notFoundValue?: any): any {\n    if (token === ActivatedRoute) {\n      return this.route;\n    }\n\n    if (token === ChildrenOutletContexts) {\n      return this.childContexts;\n    }\n\n    return this.parent.get(token, notFoundValue);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {from, Observable, of, Subscription} from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n  abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return fn().pipe(catchError(() => of(null)));\n  }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return of(null);\n  }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n  private loader: RouterConfigLoader;\n  private subscription?: Subscription;\n\n  constructor(\n      private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n      private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n    const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n    const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n  }\n\n  setUpPreloading(): void {\n    this.subscription =\n        this.router.events\n            .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n            .subscribe(() => {});\n  }\n\n  preload(): Observable<any> {\n    const ngModule = this.injector.get(NgModuleRef);\n    return this.processRoutes(ngModule, this.router.config);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this.subscription) {\n      this.subscription.unsubscribe();\n    }\n  }\n\n  private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n    const res: Observable<any>[] = [];\n    for (const route of routes) {\n      // we already have the config loaded, just recurse\n      if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n        const childConfig = route._loadedConfig;\n        res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n        // no config loaded, fetch the config\n      } else if (route.loadChildren && !route.canLoad) {\n        res.push(this.preloadConfig(ngModule, route));\n\n        // recurse into children\n      } else if (route.children) {\n        res.push(this.processRoutes(ngModule, route.children));\n      }\n    }\n    return from(res).pipe(mergeAll(), map((_) => void 0));\n  }\n\n  private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n    return this.preloadingStrategy.preload(route, () => {\n      const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                            this.loader.load(ngModule.injector, route);\n      return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n        route._loadedConfig = config;\n        return this.processRoutes(config.module, config.routes);\n      }));\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {Injectable, OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\n@Injectable()\nexport class RouterScroller implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  private routerEventsSubscription!: Unsubscribable;\n  // TODO(issue/24571): remove '!'.\n  private scrollEventsSubscription!: Unsubscribable;\n\n  private lastId = 0;\n  private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n  private restoredId = 0;\n  private store: {[key: string]: [number, number]} = {};\n\n  constructor(\n      private router: Router,\n      /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n        scrollPositionRestoration?: 'disabled'|'enabled'|'top',\n        anchorScrolling?: 'disabled'|'enabled'\n      } = {}) {\n    // Default both options to 'disabled'\n    options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n    options.anchorScrolling = options.anchorScrolling || 'disabled';\n  }\n\n  init(): void {\n    // we want to disable the automatic scrolling because having two places\n    // responsible for scrolling results race conditions, especially given\n    // that browser don't implement this behavior consistently\n    if (this.options.scrollPositionRestoration !== 'disabled') {\n      this.viewportScroller.setHistoryScrollRestoration('manual');\n    }\n    this.routerEventsSubscription = this.createScrollEvents();\n    this.scrollEventsSubscription = this.consumeScrollEvents();\n  }\n\n  private createScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (e instanceof NavigationStart) {\n        // store the scroll position of the current stable navigations.\n        this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n        this.lastSource = e.navigationTrigger;\n        this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n      } else if (e instanceof NavigationEnd) {\n        this.lastId = e.id;\n        this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n      }\n    });\n  }\n\n  private consumeScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (!(e instanceof Scroll)) return;\n      // a popstate event. The pop state event will always ignore anchor scrolling.\n      if (e.position) {\n        if (this.options.scrollPositionRestoration === 'top') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        } else if (this.options.scrollPositionRestoration === 'enabled') {\n          this.viewportScroller.scrollToPosition(e.position);\n        }\n        // imperative navigation \"forward\"\n      } else {\n        if (e.anchor && this.options.anchorScrolling === 'enabled') {\n          this.viewportScroller.scrollToAnchor(e.anchor);\n        } else if (this.options.scrollPositionRestoration !== 'disabled') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        }\n      }\n    });\n  }\n\n  private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n    this.router.triggerEvent(new Scroll(\n        routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n  }\n\n  /** @nodoc */\n  ngOnDestroy() {\n    if (this.routerEventsSubscription) {\n      this.routerEventsSubscription.unsubscribe();\n    }\n    if (this.scrollEventsSubscription) {\n      this.scrollEventsSubscription.unsubscribe();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, Location, LOCATION_INITIALIZED, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, OnDestroy, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {of, Subject} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {Event} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES =\n    [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n  Location,\n  {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n  {\n    provide: Router,\n    useFactory: setupRouter,\n    deps: [\n      UrlSerializer, ChildrenOutletContexts, Location, Injector, NgModuleFactoryLoader, Compiler,\n      ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n      [RouteReuseStrategy, new Optional()]\n    ]\n  },\n  ChildrenOutletContexts,\n  {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n  {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n  RouterPreloader,\n  NoPreloading,\n  PreloadAllModules,\n  {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n  return new NgProbeToken('Router', Router);\n}\n\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/router) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\n@NgModule({\n  declarations: ROUTER_DIRECTIVES,\n  exports: ROUTER_DIRECTIVES,\n  entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n  // Note: We are injecting the Router so it gets created eagerly...\n  constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n  /**\n   * Creates and configures a module with all the router providers and directives.\n   * Optionally sets up an application listener to perform an initial navigation.\n   *\n   * When registering the NgModule at the root, import as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forRoot(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the application.\n   * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n   * @return The new `NgModule`.\n   *\n   */\n  static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [\n        ROUTER_PROVIDERS,\n        provideRoutes(routes),\n        {\n          provide: ROUTER_FORROOT_GUARD,\n          useFactory: provideForRootGuard,\n          deps: [[Router, new Optional(), new SkipSelf()]]\n        },\n        {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n        {\n          provide: LocationStrategy,\n          useFactory: provideLocationStrategy,\n          deps:\n              [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]\n        },\n        {\n          provide: RouterScroller,\n          useFactory: createRouterScroller,\n          deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n        },\n        {\n          provide: PreloadingStrategy,\n          useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n                                                             NoPreloading\n        },\n        {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n        provideRouterInitializer(),\n      ],\n    };\n  }\n\n  /**\n   * Creates a module with all the router directives and a provider registering routes,\n   * without creating a new Router service.\n   * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forChild(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n   * @return The new NgModule.\n   *\n   */\n  static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n    return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n  }\n}\n\nexport function createRouterScroller(\n    router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n  if (config.scrollOffset) {\n    viewportScroller.setOffset(config.scrollOffset);\n  }\n  return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n    platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n  return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n                           new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n  if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n    throw new Error(\n        `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n  }\n  return 'guarded';\n}\n\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n *   imports: [RouterModule.forChild(ROUTES)],\n *   providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n  return [\n    {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n    {provide: ROUTES, multi: true, useValue: routes},\n  ];\n}\n\n/**\n * Allowed values in an `ExtraOptions` object that configure\n * when the router performs the initial navigation operation.\n *\n * * 'enabledNonBlocking' - (default) The initial navigation starts after the\n * root component has been created. The bootstrap is not blocked on the completion of the initial\n * navigation.\n * * 'enabledBlocking' - The initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete. This value is required\n * for [server-side rendering](guide/universal) to work.\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\n * the root component gets created. Use if there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic.\n *\n * The following values have been [deprecated](guide/releases#deprecation-practices) since v11,\n * and should not be used for new applications.\n *\n * * 'enabled' - This option is 1:1 replaceable with `enabledBlocking`.\n *\n * @see `forRoot()`\n *\n * @publicApi\n */\nexport type InitialNavigation = 'disabled'|'enabled'|'enabledBlocking'|'enabledNonBlocking';\n\n/**\n * A set of configuration options for a router module, provided in the\n * `forRoot()` method.\n *\n * @see `forRoot()`\n *\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n  /**\n   * When true, log all internal navigation events to the console.\n   * Use for debugging.\n   */\n  enableTracing?: boolean;\n\n  /**\n   * When true, enable the location strategy that uses the URL fragment\n   * instead of the history API.\n   */\n  useHash?: boolean;\n\n  /**\n   * One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.\n   * When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root\n   * component is created. The bootstrap is blocked until the initial navigation is complete. This\n   * value is required for [server-side rendering](guide/universal) to work. When set to\n   * `enabledNonBlocking`, the initial navigation starts after the root component has been created.\n   * The bootstrap is not blocked on the completion of the initial navigation. When set to\n   * `disabled`, the initial navigation is not performed. The location listener is set up before the\n   * root component gets created. Use if there is a reason to have more control over when the router\n   * starts its initial navigation due to some complex initialization logic.\n   */\n  initialNavigation?: InitialNavigation;\n\n  /**\n   * A custom error handler for failed navigations.\n   * If the handler returns a value, the navigation Promise is resolved with this value.\n   * If the handler throws an exception, the navigation Promise is rejected with the exception.\n   *\n   */\n  errorHandler?: ErrorHandler;\n\n  /**\n   * Configures a preloading strategy.\n   * One of `PreloadAllModules` or `NoPreloading` (the default).\n   */\n  preloadingStrategy?: any;\n\n  /**\n   * Define what the router should do if it receives a navigation request to the current URL.\n   * Default is `ignore`, which causes the router ignores the navigation.\n   * This can disable features such as a \"refresh\" button.\n   * Use this option to configure the behavior when navigating to the\n   * current URL. Default is 'ignore'.\n   */\n  onSameUrlNavigation?: 'reload'|'ignore';\n\n  /**\n   * Configures if the scroll position needs to be restored when navigating back.\n   *\n   * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\n   * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\n   * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\n   * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\n   * navigation). This option will be the default in the future.\n   *\n   * You can implement custom scroll restoration behavior by adapting the enabled behavior as\n   * in the following example.\n   *\n   * ```typescript\n   * class AppModule {\n   *   constructor(router: Router, viewportScroller: ViewportScroller) {\n   *     router.events.pipe(\n   *       filter((e: Event): e is Scroll => e instanceof Scroll)\n   *     ).subscribe(e => {\n   *       if (e.position) {\n   *         // backward navigation\n   *         viewportScroller.scrollToPosition(e.position);\n   *       } else if (e.anchor) {\n   *         // anchor navigation\n   *         viewportScroller.scrollToAnchor(e.anchor);\n   *       } else {\n   *         // forward navigation\n   *         viewportScroller.scrollToPosition([0, 0]);\n   *       }\n   *     });\n   *   }\n   * }\n   * ```\n   */\n  scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n  /**\n   * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\n   * Anchor scrolling is disabled by default.\n   *\n   * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n   * that we stored or scroll to the top.\n   */\n  anchorScrolling?: 'disabled'|'enabled';\n\n  /**\n   * Configures the scroll offset the router will use when scrolling to an element.\n   *\n   * When given a tuple with x and y position value,\n   * the router uses that offset each time it scrolls.\n   * When given a function, the router invokes the function every time\n   * it restores scroll position.\n   */\n  scrollOffset?: [number, number]|(() => [number, number]);\n\n  /**\n   * Defines how the router merges parameters, data, and resolved data from parent to child\n   * routes. By default ('emptyOnly'), inherits parent parameters only for\n   * path-less or component-less routes.\n   *\n   * Set to 'always' to enable unconditional inheritance of parent parameters.\n   *\n   * Note that when dealing with matrix parameters, \"parent\" refers to the parent `Route`\n   * config which does not necessarily mean the \"URL segment to the left\". When the `Route` `path`\n   * contains multiple segments, the matrix parameters must appear on the last segment. For example,\n   * matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not\n   * `a;foo=bar/b`.\n   *\n   */\n  paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n  /**\n   * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\n   * invalid character sequences.\n   * The default implementation is to redirect to the root URL, dropping\n   * any path or parameter information. The function takes three parameters:\n   *\n   * - `'URIError'` - Error thrown when parsing a bad URL.\n   * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n   * - `'url'` -  The malformed URL that caused the URIError\n   * */\n  malformedUriErrorHandler?:\n      (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n  /**\n   * Defines when the router updates the browser URL. By default ('deferred'),\n   * update after successful navigation.\n   * Set to 'eager' if prefer to update the URL at the beginning of navigation.\n   * Updating the URL early allows you to handle a failure of navigation by\n   * showing an error message with the URL that failed.\n   */\n  urlUpdateStrategy?: 'deferred'|'eager';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * Example:\n   *\n   * ```\n   * const routes = [\n   *   {\n   *     path: '',\n   *     component: ContainerComponent,\n   *     children: [\n   *       { path: 'a', component: AComponent },\n   *       { path: 'b', component: BComponent },\n   *     ]\n   *   }\n   * ];\n   * ```\n   *\n   * From the `ContainerComponent`, you should be able to navigate to `AComponent` using\n   * the following `routerLink`, but it will not work if `relativeLinkResolution` is set\n   * to `'legacy'`:\n   *\n   * `<a [routerLink]=\"['./a']\">Link to A</a>`\n   *\n   * However, this will work:\n   *\n   * `<a [routerLink]=\"['../a']\">Link to A</a>`\n   *\n   * In other words, you're required to use `../` rather than `./` when the relative link\n   * resolution is set to `'legacy'`.\n   *\n   * The default in v11 is `corrected`.\n   */\n  relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n    urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n    injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][],\n    opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n    routeReuseStrategy?: RouteReuseStrategy) {\n  const router = new Router(\n      null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n  if (urlHandlingStrategy) {\n    router.urlHandlingStrategy = urlHandlingStrategy;\n  }\n\n  if (routeReuseStrategy) {\n    router.routeReuseStrategy = routeReuseStrategy;\n  }\n\n  assignExtraOptionsToRouter(opts, router);\n\n  if (opts.enableTracing) {\n    router.events.subscribe((e: Event) => {\n      // tslint:disable:no-console\n      console.group?.(`Router Event: ${(<any>e.constructor).name}`);\n      console.log(e.toString());\n      console.log(e);\n      console.groupEnd?.();\n      // tslint:enable:no-console\n    });\n  }\n\n  return router;\n}\n\nexport function assignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void {\n  if (opts.errorHandler) {\n    router.errorHandler = opts.errorHandler;\n  }\n\n  if (opts.malformedUriErrorHandler) {\n    router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n  }\n\n  if (opts.onSameUrlNavigation) {\n    router.onSameUrlNavigation = opts.onSameUrlNavigation;\n  }\n\n  if (opts.paramsInheritanceStrategy) {\n    router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n  }\n\n  if (opts.relativeLinkResolution) {\n    router.relativeLinkResolution = opts.relativeLinkResolution;\n  }\n\n  if (opts.urlUpdateStrategy) {\n    router.urlUpdateStrategy = opts.urlUpdateStrategy;\n  }\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n  return router.routerState.root;\n}\n\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer implements OnDestroy {\n  private initNavigation = false;\n  private destroyed = false;\n  private resultOfPreactivationDone = new Subject<void>();\n\n  constructor(private injector: Injector) {}\n\n  appInitializer(): Promise<any> {\n    const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n    return p.then(() => {\n      // If the injector was destroyed, the DI lookups below will fail.\n      if (this.destroyed) {\n        return Promise.resolve(true);\n      }\n\n      let resolve: Function = null!;\n      const res = new Promise(r => resolve = r);\n      const router = this.injector.get(Router);\n      const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n      if (opts.initialNavigation === 'disabled') {\n        router.setUpLocationChangeListener();\n        resolve(true);\n      } else if (\n          // TODO: enabled is deprecated as of v11, can be removed in v13\n          opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') {\n        router.hooks.afterPreactivation = () => {\n          // only the initial navigation should be delayed\n          if (!this.initNavigation) {\n            this.initNavigation = true;\n            resolve(true);\n            return this.resultOfPreactivationDone;\n\n            // subsequent navigations should not be delayed\n          } else {\n            return of(null) as any;\n          }\n        };\n        router.initialNavigation();\n      } else {\n        resolve(true);\n      }\n\n      return res;\n    });\n  }\n\n  bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n    const opts = this.injector.get(ROUTER_CONFIGURATION);\n    const preloader = this.injector.get(RouterPreloader);\n    const routerScroller = this.injector.get(RouterScroller);\n    const router = this.injector.get(Router);\n    const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n\n    // Default case\n    if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) {\n      router.initialNavigation();\n    }\n\n    preloader.setUpPreloading();\n    routerScroller.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    this.resultOfPreactivationDone.next(null!);\n    this.resultOfPreactivationDone.complete();\n  }\n\n  ngOnDestroy() {\n    this.destroyed = true;\n  }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n  return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n  return r.bootstrapListener.bind(r);\n}\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n    new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer(): ReadonlyArray<Provider> {\n  return [\n    RouterInitializer,\n    {\n      provide: APP_INITIALIZER,\n      multi: true,\n      useFactory: getAppInitializer,\n      deps: [RouterInitializer]\n    },\n    {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n  ];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('12.2.13');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, DeprecatedLoadChildren, LoadChildren, LoadChildrenCallback, QueryParamsHandling, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatcher, UrlMatchResult} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet, RouterOutletContract} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {BaseRouteReuseStrategy, DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationBehaviorOptions, NavigationExtras, Router, UrlCreationOptions} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, InitialNavigation, provideRoutes, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, IsActiveMatchOptions, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {EmptyOutletComponent as ɵangular_packages_router_router_l} from './src/components/empty_outlet';\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_o} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_m,TreeNode as ɵangular_packages_router_router_n} from './src/utils/tree';"]}
Index: trip-planner-front/node_modules/@angular/router/bundles/router-testing.umd.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/bundles/router-testing.umd.js	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/bundles/router-testing.umd.js	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
Index: trip-planner-front/node_modules/@angular/router/bundles/router-upgrade.umd.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/bundles/router-upgrade.umd.js	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/bundles/router-upgrade.umd.js	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
Index: trip-planner-front/node_modules/@angular/router/bundles/router.umd.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/bundles/router.umd.js	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/bundles/router.umd.js	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
@@ -4823,4 +4823,5 @@
                     }
                 }), operators.finalize(function () {
+                    var _a;
                     /* When the navigation stream finishes either through error or success, we
                      * set the `completed` or `errored` flag. However, there are some situations
@@ -4855,8 +4856,9 @@
                         }
                     }
-                    // currentNavigation should always be reset to null here. If navigation was
-                    // successful, lastSuccessfulTransition will have already been set. Therefore
-                    // we can safely set currentNavigation to null here.
-                    _this.currentNavigation = null;
+                    // Only clear current navigation if it is still set to the one that
+                    // finalized.
+                    if (((_a = _this.currentNavigation) === null || _a === void 0 ? void 0 : _a.id) === t.id) {
+                        _this.currentNavigation = null;
+                    }
                 }), operators.catchError(function (e) {
                     // TODO(atscott): The NavigationTransition `t` used here does not accurately
@@ -6768,5 +6770,5 @@
      * @publicApi
      */
-    var VERSION = new core.Version('12.2.9');
+    var VERSION = new core.Version('12.2.13');
 
     /**
Index: trip-planner-front/node_modules/@angular/router/bundles/router.umd.js.map
===================================================================
--- trip-planner-front/node_modules/@angular/router/bundles/router.umd.js.map	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/bundles/router.umd.js.map	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,1 +1,1 @@
-{"version":3,"file":"router.umd.js","sources":["../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../packages/router/src/events.ts","../../../../../packages/router/src/shared.ts","../../../../../packages/router/src/utils/collection.ts","../../../../../packages/router/src/url_tree.ts","../../../../../packages/router/src/utils/tree.ts","../../../../../packages/router/src/router_state.ts","../../../../../packages/router/src/create_router_state.ts","../../../../../packages/router/src/create_url_tree.ts","../../../../../packages/router/src/operators/activate_routes.ts","../../../../../packages/router/src/config.ts","../../../../../packages/router/src/utils/type_guards.ts","../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../packages/router/src/components/empty_outlet.ts","../../../../../packages/router/src/utils/config.ts","../../../../../packages/router/src/utils/config_matching.ts","../../../../../packages/router/src/apply_redirects.ts","../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../packages/router/src/utils/preactivation.ts","../../../../../packages/router/src/operators/check_guards.ts","../../../../../packages/router/src/recognize.ts","../../../../../packages/router/src/operators/recognize.ts","../../../../../packages/router/src/operators/resolve_data.ts","../../../../../packages/router/src/operators/switch_tap.ts","../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../packages/router/src/router_config_loader.ts","../../../../../packages/router/src/router_outlet_context.ts","../../../../../packages/router/src/url_handling_strategy.ts","../../../../../packages/router/src/router.ts","../../../../../packages/router/src/directives/router_link.ts","../../../../../packages/router/src/directives/router_link_active.ts","../../../../../packages/router/src/directives/router_outlet.ts","../../../../../packages/router/src/router_preloader.ts","../../../../../packages/router/src/router_scroller.ts","../../../../../packages/router/src/router_module.ts","../../../../../packages/router/src/version.ts","../../../../../packages/router/src/private_export.ts","../../../../../packages/router/src/index.ts","../../../../../packages/router/public_api.ts","../../../../../packages/router/index.ts","../../../../../packages/router/router.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    if (typeof b !== \"function\" && b !== null)\r\n        throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n    if (m) return m.call(o);\r\n    if (o && typeof o.length === \"number\") return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n            r[k] = a[j];\r\n    return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n        if (ar || !(i in from)) {\r\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n            ar[i] = from[i];\r\n        }\r\n    }\r\n    return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n    o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n    __setModuleDefault(result, mod);\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n    if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n    return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * Identifies the call or event that triggered a navigation.\n *\n * * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.\n * * 'popstate' : Triggered by a `popstate` event.\n * * 'hashchange'-: Triggered by a `hashchange` event.\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative'|'popstate'|'hashchange';\n\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n *   constructor(public router: Router) {\n *     router.events.pipe(\n *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n *     ).subscribe((e: RouterEvent) => {\n *       // Do something\n *     });\n *   }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router-reference#router-events)\n * @publicApi\n */\nexport class RouterEvent {\n  constructor(\n      /** A unique ID that the router assigns to every router navigation. */\n      public id: number,\n      /** The URL that is the destination for this navigation. */\n      public url: string) {}\n}\n\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n  /**\n   * Identifies the call or event that triggered the navigation.\n   * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n   *\n   * @see `NavigationEnd`\n   * @see `NavigationCancel`\n   * @see `NavigationError`\n   */\n  navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n  /**\n   * The navigation state that was previously supplied to the `pushState` call,\n   * when the navigation is triggered by a `popstate` event. Otherwise null.\n   *\n   * The state object is defined by `NavigationExtras`, and contains any\n   * developer-defined state value, as well as a unique ID that\n   * the router assigns to every router transition/navigation.\n   *\n   * From the perspective of the router, the router never \"goes back\".\n   * When the user clicks on the back button in the browser,\n   * a new navigation ID is created.\n   *\n   * Use the ID in this previous-state object to differentiate between a newly created\n   * state and one returned to by a `popstate` event, so that you can restore some\n   * remembered state, such as scroll position.\n   *\n   */\n  restoredState?: {[k: string]: any, navigationId: number}|null;\n\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n      /** @docsNotRequired */\n      restoredState: {[k: string]: any, navigationId: number}|null = null) {\n    super(id, url);\n    this.navigationTrigger = navigationTrigger;\n    this.restoredState = restoredState;\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public reason: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationCancel`\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public error: any) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n  }\n}\n\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot,\n      /** @docsNotRequired */\n      public shouldActivate: boolean) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see `ResolveEnd`\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadStart(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadEnd(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see  `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart`\n * @publicApi\n */\nexport class ChildActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nexport class Scroll {\n  constructor(\n      /** @docsNotRequired */\n      readonly routerEvent: NavigationEnd,\n\n      /** @docsNotRequired */\n      readonly position: [number, number]|null,\n\n      /** @docsNotRequired */\n      readonly anchor: string|null) {}\n\n  toString(): string {\n    const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n    return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n  }\n}\n\n/**\n * Router events that allow you to track the lifecycle of the router.\n *\n * The events occur in the following sequence:\n *\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\n * the router [lazy loads](/guide/router#lazy-loading) a route configuration.\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\n * and the routes are recognized.\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\n * phase of routing.\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\n * begins activating a route's children.\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\n * phase of routing successfully.\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\n * phase of routing.\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\n * phase of routing successfully.\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\n * activating a route's children.\n * * [ActivationEnd](api/router/ActivationEnd): When the router finishes activating a route.\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\n * * [NavigationError](api/router/NavigationError): When navigation fails\n * due to an unexpected error.\n * * [Scroll](api/router/Scroll): When the user scrolls.\n *\n * @publicApi\n */\nexport type Event = RouterEvent|RouteConfigLoadStart|RouteConfigLoadEnd|ChildActivationStart|\n    ChildActivationEnd|ActivationStart|ActivationEnd|Scroll;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of matrix and query URL parameters.\n * @see `convertToParamMap()`\n * @see `ParamMap`\n *\n * @publicApi\n */\nexport type Params = {\n  [key: string]: any;\n};\n\n/**\n * A map that provides access to the required and optional parameters\n * specific to a route.\n * The map supports retrieving a single value with `get()`\n * or multiple values with `getAll()`.\n *\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n *\n * @publicApi\n */\nexport interface ParamMap {\n  /**\n   * Reports whether the map contains a given parameter.\n   * @param name The parameter name.\n   * @returns True if the map contains the given parameter, false otherwise.\n   */\n  has(name: string): boolean;\n  /**\n   * Retrieves a single value for a parameter.\n   * @param name The parameter name.\n   * @return The parameter's single value,\n   * or the first value if the parameter has multiple values,\n   * or `null` when there is no such parameter.\n   */\n  get(name: string): string|null;\n  /**\n   * Retrieves multiple values for a parameter.\n   * @param name The parameter name.\n   * @return An array containing one or more values,\n   * or an empty array if there is no such parameter.\n   *\n   */\n  getAll(name: string): string[];\n\n  /** Names of the parameters in the map. */\n  readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n  private params: Params;\n\n  constructor(params: Params) {\n    this.params = params || {};\n  }\n\n  has(name: string): boolean {\n    return Object.prototype.hasOwnProperty.call(this.params, name);\n  }\n\n  get(name: string): string|null {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v[0] : v;\n    }\n\n    return null;\n  }\n\n  getAll(name: string): string[] {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v : [v];\n    }\n\n    return [];\n  }\n\n  get keys(): string[] {\n    return Object.keys(this.params);\n  }\n}\n\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n  return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n  const error = Error('NavigationCancelingError: ' + message);\n  (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n  return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n  return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n    segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n  const parts = route.path!.split('/');\n\n  if (parts.length > segments.length) {\n    // The actual URL is shorter than the config, no match\n    return null;\n  }\n\n  if (route.pathMatch === 'full' &&\n      (segmentGroup.hasChildren() || parts.length < segments.length)) {\n    // The config is longer than the actual URL but we are looking for a full match, return null\n    return null;\n  }\n\n  const posParams: {[key: string]: UrlSegment} = {};\n\n  // Check each config part against the actual URL\n  for (let index = 0; index < parts.length; index++) {\n    const part = parts[index];\n    const segment = segments[index];\n    const isParameter = part.startsWith(':');\n    if (isParameter) {\n      posParams[part.substring(1)] = segment;\n    } else if (part !== segment.path) {\n      // The actual URL part does not match the config, no match\n      return null;\n    }\n  }\n\n  return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {from, Observable, of} from 'rxjs';\n\nimport {Params} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; ++i) {\n    if (!shallowEqual(a[i], b[i])) return false;\n  }\n  return true;\n}\n\nexport function shallowEqual(a: Params, b: Params): boolean {\n  // While `undefined` should never be possible, it would sometimes be the case in IE 11\n  // and pre-chromium Edge. The check below accounts for this edge case.\n  const k1 = a ? Object.keys(a) : undefined;\n  const k2 = b ? Object.keys(b) : undefined;\n  if (!k1 || !k2 || k1.length != k2.length) {\n    return false;\n  }\n  let key: string;\n  for (let i = 0; i < k1.length; i++) {\n    key = k1[i];\n    if (!equalArraysOrString(a[key], b[key])) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Test equality for arrays of strings or a string.\n */\nexport function equalArraysOrString(a: string|string[], b: string|string[]) {\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    const aSorted = [...a].sort();\n    const bSorted = [...b].sort();\n    return aSorted.every((val, index) => bSorted[index] === val);\n  } else {\n    return a === b;\n  }\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n  return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n  return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n  return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n  for (const prop in map) {\n    if (map.hasOwnProperty(prop)) {\n      callback(map[prop], prop);\n    }\n  }\n}\n\nexport function wrapIntoObservable<T>(value: T|Promise<T>|Observable<T>): Observable<T> {\n  if (isObservable(value)) {\n    return value;\n  }\n\n  if (isPromise(value)) {\n    // Use `Promise.resolve()` to wrap promise-like instances.\n    // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n    // change detection.\n    return from(Promise.resolve(value));\n  }\n\n  return of(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalArraysOrString, forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n  return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\n/**\n * A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`\n * for the current router state.\n *\n * @publicApi\n * @see Router.isActive\n */\nexport interface IsActiveMatchOptions {\n  /**\n   * Defines the strategy for comparing the matrix parameters of two `UrlTree`s.\n   *\n   * The matrix parameter matching is dependent on the strategy for matching the\n   * segments. That is, if the `paths` option is set to `'subset'`, only\n   * the matrix parameters of the matching segments will be compared.\n   *\n   * - `'exact'`: Requires that matching segments also have exact matrix parameter\n   * matches.\n   * - `'subset'`: The matching segments in the router's active `UrlTree` may contain\n   * extra matrix parameters, but those that exist in the `UrlTree` in question must match.\n   * - `'ignored'`: When comparing `UrlTree`s, matrix params will be ignored.\n   */\n  matrixParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the query parameters of two `UrlTree`s.\n   *\n   * - `'exact'`: the query parameters must match exactly.\n   * - `'subset'`: the active `UrlTree` may contain extra parameters,\n   * but must match the key and value of any that exist in the `UrlTree` in question.\n   * - `'ignored'`: When comparing `UrlTree`s, query params will be ignored.\n   */\n  queryParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the `UrlSegment`s of the `UrlTree`s.\n   *\n   * - `'exact'`: all segments in each `UrlTree` must match.\n   * - `'subset'`: a `UrlTree` will be determined to be active if it\n   * is a subtree of the active route. That is, the active route may contain extra\n   * segments, but must at least have all the segements of the `UrlTree` in question.\n   */\n  paths: 'exact'|'subset';\n  /**\n   * - 'exact'`: indicates that the `UrlTree` fragments must be equal.\n   * - `'ignored'`: the fragments will not be compared when determining if a\n   * `UrlTree` is active.\n   */\n  fragment: 'exact'|'ignored';\n}\n\ntype ParamMatchOptions = 'exact'|'subset'|'ignored';\n\ntype PathCompareFn =\n    (container: UrlSegmentGroup, containee: UrlSegmentGroup, matrixParams: ParamMatchOptions) =>\n        boolean;\ntype ParamCompareFn = (container: Params, containee: Params) => boolean;\n\nconst pathCompareMap: Record<IsActiveMatchOptions['paths'], PathCompareFn> = {\n  'exact': equalSegmentGroups,\n  'subset': containsSegmentGroup,\n};\nconst paramCompareMap: Record<ParamMatchOptions, ParamCompareFn> = {\n  'exact': equalParams,\n  'subset': containsParams,\n  'ignored': () => true,\n};\n\nexport function containsTree(\n    container: UrlTree, containee: UrlTree, options: IsActiveMatchOptions): boolean {\n  return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) &&\n      paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) &&\n      !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\n\nfunction equalParams(container: Params, containee: Params): boolean {\n  // TODO: This does not handle array params correctly.\n  return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  if (!equalPath(container.segments, containee.segments)) return false;\n  if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n    return false;\n  }\n  if (container.numberOfChildren !== containee.numberOfChildren) return false;\n  for (const c in containee.children) {\n    if (!container.children[c]) return false;\n    if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n      return false;\n  }\n  return true;\n}\n\nfunction containsParams(container: Params, containee: Params): boolean {\n  return Object.keys(containee).length <= Object.keys(container).length &&\n      Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\n\nfunction containsSegmentGroup(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\n\nfunction containsSegmentGroupHelper(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[],\n    matrixParams: ParamMatchOptions): boolean {\n  if (container.segments.length > containeePaths.length) {\n    const current = container.segments.slice(0, containeePaths.length);\n    if (!equalPath(current, containeePaths)) return false;\n    if (containee.hasChildren()) return false;\n    if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n    return true;\n\n  } else if (container.segments.length === containeePaths.length) {\n    if (!equalPath(container.segments, containeePaths)) return false;\n    if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n    for (const c in containee.children) {\n      if (!container.children[c]) return false;\n      if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n        return false;\n      }\n    }\n    return true;\n\n  } else {\n    const current = containeePaths.slice(0, container.segments.length);\n    const next = containeePaths.slice(container.segments.length);\n    if (!equalPath(container.segments, current)) return false;\n    if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n    if (!container.children[PRIMARY_OUTLET]) return false;\n    return containsSegmentGroupHelper(\n        container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n  }\n}\n\nfunction matrixParamsMatch(\n    containerPaths: UrlSegment[], containeePaths: UrlSegment[], options: ParamMatchOptions) {\n  return containeePaths.every((containeeSegment, i) => {\n    return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n  });\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree =\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n *     const f = tree.fragment; // return 'fragment'\n *     const q = tree.queryParams; // returns {debug: 'true'}\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n *     g.children['support'].segments; // return 1 segment 'help'\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The root segment group of the URL tree */\n      public root: UrlSegmentGroup,\n      /** The query params of the URL */\n      public queryParams: Params,\n      /** The fragment of the URL */\n      public fragment: string|null) {}\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return DEFAULT_SERIALIZER.serialize(this);\n  }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n  /** @internal */\n  _sourceSegment?: UrlSegmentGroup;\n  /** @internal */\n  _segmentIndexShift?: number;\n  /** The parent node in the url tree */\n  parent: UrlSegmentGroup|null = null;\n\n  constructor(\n      /** The URL segments of this group. See `UrlSegment` for more information */\n      public segments: UrlSegment[],\n      /** The list of children of this group */\n      public children: {[key: string]: UrlSegmentGroup}) {\n    forEach(children, (v: any, k: any) => v.parent = this);\n  }\n\n  /** Whether the segment has child segments */\n  hasChildren(): boolean {\n    return this.numberOfChildren > 0;\n  }\n\n  /** Number of child segments */\n  get numberOfChildren(): number {\n    return Object.keys(this.children).length;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePaths(this);\n  }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments;\n *     s[0].path; // returns 'team'\n *     s[0].parameters; // returns {id: 33}\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _parameterMap!: ParamMap;\n\n  constructor(\n      /** The path part of a URL segment */\n      public path: string,\n\n      /** The matrix parameters associated with a segment */\n      public parameters: {[name: string]: string}) {}\n\n  get parameterMap() {\n    if (!this._parameterMap) {\n      this._parameterMap = convertToParamMap(this.parameters);\n    }\n    return this._parameterMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePath(this);\n  }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  if (as.length !== bs.length) return false;\n  return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n    segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n  let res: T[] = [];\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet === PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet !== PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n  /** Parse a url into a `UrlTree` */\n  abstract parse(url: string): UrlTree;\n\n  /** Converts a `UrlTree` into a url */\n  abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n  /** Parses a url into a `UrlTree` */\n  parse(url: string): UrlTree {\n    const p = new UrlParser(url);\n    return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n  }\n\n  /** Converts a `UrlTree` into a url */\n  serialize(tree: UrlTree): string {\n    const segment = `/${serializeSegment(tree.root, true)}`;\n    const query = serializeQueryParams(tree.queryParams);\n    const fragment =\n        typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n\n    return `${segment}${query}${fragment}`;\n  }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n  return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n  if (!segment.hasChildren()) {\n    return serializePaths(segment);\n  }\n\n  if (root) {\n    const primary = segment.children[PRIMARY_OUTLET] ?\n        serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n        '';\n    const children: string[] = [];\n\n    forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n      if (k !== PRIMARY_OUTLET) {\n        children.push(`${k}:${serializeSegment(v, false)}`);\n      }\n    });\n\n    return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n  } else {\n    const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n      if (k === PRIMARY_OUTLET) {\n        return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n      }\n\n      return [`${k}:${serializeSegment(v, false)}`];\n    });\n\n    // use no parenthesis if the only child is a primary outlet route\n    if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n      return `${serializePaths(segment)}/${children[0]}`;\n    }\n\n    return `${serializePaths(segment)}/(${children.join('//')})`;\n  }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n  return encodeURIComponent(s)\n      .replace(/%40/g, '@')\n      .replace(/%3A/gi, ':')\n      .replace(/%24/g, '$')\n      .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n  return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n  return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n  return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n  return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n  return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n  return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n  return Object.keys(params)\n      .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n      .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n  const strParams: string[] =\n      Object.keys(params)\n          .map((name) => {\n            const value = params[name];\n            return Array.isArray(value) ?\n                value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n                `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n          })\n          .filter(s => !!s);\n\n  return strParams.length ? `?${strParams.join('&')}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n  const match = str.match(SEGMENT_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n  const match = str.match(QUERY_PARAM_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n  const match = str.match(QUERY_PARAM_VALUE_RE);\n  return match ? match[0] : '';\n}\n\nclass UrlParser {\n  private remaining: string;\n\n  constructor(private url: string) {\n    this.remaining = url;\n  }\n\n  parseRootSegment(): UrlSegmentGroup {\n    this.consumeOptional('/');\n\n    if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n      return new UrlSegmentGroup([], {});\n    }\n\n    // The root segment group never has segments\n    return new UrlSegmentGroup([], this.parseChildren());\n  }\n\n  parseQueryParams(): Params {\n    const params: Params = {};\n    if (this.consumeOptional('?')) {\n      do {\n        this.parseQueryParam(params);\n      } while (this.consumeOptional('&'));\n    }\n    return params;\n  }\n\n  parseFragment(): string|null {\n    return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n  }\n\n  private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n    if (this.remaining === '') {\n      return {};\n    }\n\n    this.consumeOptional('/');\n\n    const segments: UrlSegment[] = [];\n    if (!this.peekStartsWith('(')) {\n      segments.push(this.parseSegment());\n    }\n\n    while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n      this.capture('/');\n      segments.push(this.parseSegment());\n    }\n\n    let children: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('/(')) {\n      this.capture('/');\n      children = this.parseParens(true);\n    }\n\n    let res: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('(')) {\n      res = this.parseParens(false);\n    }\n\n    if (segments.length > 0 || Object.keys(children).length > 0) {\n      res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n    }\n\n    return res;\n  }\n\n  // parse a segment with its matrix parameters\n  // ie `name;k1=v1;k2`\n  private parseSegment(): UrlSegment {\n    const path = matchSegments(this.remaining);\n    if (path === '' && this.peekStartsWith(';')) {\n      throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n    }\n\n    this.capture(path);\n    return new UrlSegment(decode(path), this.parseMatrixParams());\n  }\n\n  private parseMatrixParams(): {[key: string]: string} {\n    const params: {[key: string]: string} = {};\n    while (this.consumeOptional(';')) {\n      this.parseParam(params);\n    }\n    return params;\n  }\n\n  private parseParam(params: {[key: string]: string}): void {\n    const key = matchSegments(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchSegments(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    params[decode(key)] = decode(value);\n  }\n\n  // Parse a single query parameter `name[=value]`\n  private parseQueryParam(params: Params): void {\n    const key = matchQueryParams(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchUrlQueryParamValue(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    const decodedKey = decodeQuery(key);\n    const decodedVal = decodeQuery(value);\n\n    if (params.hasOwnProperty(decodedKey)) {\n      // Append to existing values\n      let currentVal = params[decodedKey];\n      if (!Array.isArray(currentVal)) {\n        currentVal = [currentVal];\n        params[decodedKey] = currentVal;\n      }\n      currentVal.push(decodedVal);\n    } else {\n      // Create a new value\n      params[decodedKey] = decodedVal;\n    }\n  }\n\n  // parse `(a/b//outlet_name:c/d)`\n  private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n    const segments: {[key: string]: UrlSegmentGroup} = {};\n    this.capture('(');\n\n    while (!this.consumeOptional(')') && this.remaining.length > 0) {\n      const path = matchSegments(this.remaining);\n\n      const next = this.remaining[path.length];\n\n      // if is is not one of these characters, then the segment was unescaped\n      // or the group was not closed\n      if (next !== '/' && next !== ')' && next !== ';') {\n        throw new Error(`Cannot parse url '${this.url}'`);\n      }\n\n      let outletName: string = undefined!;\n      if (path.indexOf(':') > -1) {\n        outletName = path.substr(0, path.indexOf(':'));\n        this.capture(outletName);\n        this.capture(':');\n      } else if (allowPrimary) {\n        outletName = PRIMARY_OUTLET;\n      }\n\n      const children = this.parseChildren();\n      segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n                                                                  new UrlSegmentGroup([], children);\n      this.consumeOptional('//');\n    }\n\n    return segments;\n  }\n\n  private peekStartsWith(str: string): boolean {\n    return this.remaining.startsWith(str);\n  }\n\n  // Consumes the prefix when it is present and returns whether it has been consumed\n  private consumeOptional(str: string): boolean {\n    if (this.peekStartsWith(str)) {\n      this.remaining = this.remaining.substring(str.length);\n      return true;\n    }\n    return false;\n  }\n\n  private capture(str: string): void {\n    if (!this.consumeOptional(str)) {\n      throw new Error(`Expected \"${str}\".`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n  /** @internal */\n  _root: TreeNode<T>;\n\n  constructor(root: TreeNode<T>) {\n    this._root = root;\n  }\n\n  get root(): T {\n    return this._root.value;\n  }\n\n  /**\n   * @internal\n   */\n  parent(t: T): T|null {\n    const p = this.pathFromRoot(t);\n    return p.length > 1 ? p[p.length - 2] : null;\n  }\n\n  /**\n   * @internal\n   */\n  children(t: T): T[] {\n    const n = findNode(t, this._root);\n    return n ? n.children.map(t => t.value) : [];\n  }\n\n  /**\n   * @internal\n   */\n  firstChild(t: T): T|null {\n    const n = findNode(t, this._root);\n    return n && n.children.length > 0 ? n.children[0].value : null;\n  }\n\n  /**\n   * @internal\n   */\n  siblings(t: T): T[] {\n    const p = findPath(t, this._root);\n    if (p.length < 2) return [];\n\n    const c = p[p.length - 2].children.map(c => c.value);\n    return c.filter(cc => cc !== t);\n  }\n\n  /**\n   * @internal\n   */\n  pathFromRoot(t: T): T[] {\n    return findPath(t, this._root).map(s => s.value);\n  }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n  if (value === node.value) return node;\n\n  for (const child of node.children) {\n    const node = findNode(value, child);\n    if (node) return node;\n  }\n\n  return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n  if (value === node.value) return [node];\n\n  for (const child of node.children) {\n    const path = findPath(value, child);\n    if (path.length) {\n      path.unshift(node);\n      return path;\n    }\n  }\n\n  return [];\n}\n\nexport class TreeNode<T> {\n  constructor(public value: T, public children: TreeNode<T>[]) {}\n\n  toString(): string {\n    return `TreeNode(${this.value})`;\n  }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends {outlet: string}>(node: TreeNode<T>|null) {\n  const map: {[outlet: string]: TreeNode<T>} = {};\n\n  if (node) {\n    node.children.forEach(child => map[child.value.outlet] = child);\n  }\n\n  return map;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalSegments, UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const root: ActivatedRoute = state.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n  /** @internal */\n  constructor(\n      root: TreeNode<ActivatedRoute>,\n      /** The current snapshot of the router state */\n      public snapshot: RouterStateSnapshot) {\n    super(root);\n    setRouterState(<RouterState>this, root);\n  }\n\n  override toString(): string {\n    return this.snapshot.toString();\n  }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>|null): RouterState {\n  const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n  const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n  const emptyParams = new BehaviorSubject({});\n  const emptyData = new BehaviorSubject({});\n  const emptyQueryParams = new BehaviorSubject({});\n  const fragment = new BehaviorSubject('');\n  const activated = new ActivatedRoute(\n      emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n      snapshot.root);\n  activated.snapshot = snapshot.root;\n  return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n    urlTree: UrlTree, rootComponent: Type<any>|null): RouterStateSnapshot {\n  const emptyParams = {};\n  const emptyData = {};\n  const emptyQueryParams = {};\n  const fragment = '';\n  const activated = new ActivatedRouteSnapshot(\n      [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n      urlTree.root, -1, {});\n  return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n *     header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n  /** The current snapshot of this route */\n  snapshot!: ActivatedRouteSnapshot;\n  /** @internal */\n  _futureSnapshot: ActivatedRouteSnapshot;\n  /** @internal */\n  _routerState!: RouterState;\n  /** @internal */\n  _paramMap!: Observable<ParamMap>;\n  /** @internal */\n  _queryParamMap!: Observable<ParamMap>;\n\n  /** @internal */\n  constructor(\n      /** An observable of the URL segments matched by this route. */\n      public url: Observable<UrlSegment[]>,\n      /** An observable of the matrix parameters scoped to this route. */\n      public params: Observable<Params>,\n      /** An observable of the query parameters shared by all the routes. */\n      public queryParams: Observable<Params>,\n      /** An observable of the URL fragment shared by all the routes. */\n      public fragment: Observable<string|null>,\n      /** An observable of the static and resolved data of this route. */\n      public data: Observable<Data>,\n      /** The outlet name of the route, a constant. */\n      public outlet: string,\n      /** The component of the route, a constant. */\n      // TODO(vsavkin): remove |string\n      public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n    this._futureSnapshot = futureSnapshot;\n  }\n\n  /** The configuration used to match this route. */\n  get routeConfig(): Route|null {\n    return this._futureSnapshot.routeConfig;\n  }\n\n  /** The root of the router state. */\n  get root(): ActivatedRoute {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree. */\n  get parent(): ActivatedRoute|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree. */\n  get firstChild(): ActivatedRoute|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree. */\n  get children(): ActivatedRoute[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route. */\n  get pathFromRoot(): ActivatedRoute[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  /**\n   * An Observable that contains a map of the required and optional parameters\n   * specific to the route.\n   * The map supports retrieving single and multiple values from the same parameter.\n   */\n  get paramMap(): Observable<ParamMap> {\n    if (!this._paramMap) {\n      this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._paramMap;\n  }\n\n  /**\n   * An Observable that contains a map of the query parameters available to all routes.\n   * The map supports retrieving single and multiple values from the query parameter.\n   */\n  get queryParamMap(): Observable<ParamMap> {\n    if (!this._queryParamMap) {\n      this._queryParamMap =\n          this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n  }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly'|'always';\n\n/** @internal */\nexport type Inherited = {\n  params: Params,\n  data: Data,\n  resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n    route: ActivatedRouteSnapshot,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n  const pathFromRoot = route.pathFromRoot;\n\n  let inheritingStartingFrom = 0;\n  if (paramsInheritanceStrategy !== 'always') {\n    inheritingStartingFrom = pathFromRoot.length - 1;\n\n    while (inheritingStartingFrom >= 1) {\n      const current = pathFromRoot[inheritingStartingFrom];\n      const parent = pathFromRoot[inheritingStartingFrom - 1];\n      // current route is an empty path => inherits its parent's params and data\n      if (current.routeConfig && current.routeConfig.path === '') {\n        inheritingStartingFrom--;\n\n        // parent is componentless => current route should inherit its params and data\n      } else if (!parent.component) {\n        inheritingStartingFrom--;\n\n      } else {\n        break;\n      }\n    }\n  }\n\n  return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n  return pathFromRoot.reduce((res, curr) => {\n    const params = {...res.params, ...curr.params};\n    const data = {...res.data, ...curr.data};\n    const resolve = {...res.resolve, ...curr._resolvedData};\n    return {params, data, resolve};\n  }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n *   constructor(route: ActivatedRoute) {\n *     const id: string = route.snapshot.params.id;\n *     const url: string = route.snapshot.url.join('');\n *     const user = route.snapshot.data.user;\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n  /** The configuration used to match this route **/\n  public readonly routeConfig: Route|null;\n  /** @internal **/\n  _urlSegment: UrlSegmentGroup;\n  /** @internal */\n  _lastPathIndex: number;\n  /** @internal */\n  _resolve: ResolveData;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _resolvedData!: Data;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _routerState!: RouterStateSnapshot;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _paramMap!: ParamMap;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The URL segments matched by this route */\n      public url: UrlSegment[],\n      /**\n       *  The matrix parameters scoped to this route.\n       *\n       *  You can compute all params (or data) in the router state or to get params outside\n       *  of an activated component by traversing the `RouterState` tree as in the following\n       *  example:\n       *  ```\n       *  collectRouteParams(router: Router) {\n       *    let params = {};\n       *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n       *    while (stack.length > 0) {\n       *      const route = stack.pop()!;\n       *      params = {...params, ...route.params};\n       *      stack.push(...route.children);\n       *    }\n       *    return params;\n       *  }\n       *  ```\n       */\n      public params: Params,\n      /** The query parameters shared by all the routes */\n      public queryParams: Params,\n      /** The URL fragment shared by all the routes */\n      public fragment: string|null,\n      /** The static and resolved data of this route */\n      public data: Data,\n      /** The outlet name of the route */\n      public outlet: string,\n      /** The component of the route */\n      public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n      lastPathIndex: number, resolve: ResolveData) {\n    this.routeConfig = routeConfig;\n    this._urlSegment = urlSegment;\n    this._lastPathIndex = lastPathIndex;\n    this._resolve = resolve;\n  }\n\n  /** The root of the router state */\n  get root(): ActivatedRouteSnapshot {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree */\n  get parent(): ActivatedRouteSnapshot|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree */\n  get firstChild(): ActivatedRouteSnapshot|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree */\n  get children(): ActivatedRouteSnapshot[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route */\n  get pathFromRoot(): ActivatedRouteSnapshot[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  get paramMap(): ParamMap {\n    if (!this._paramMap) {\n      this._paramMap = convertToParamMap(this.params);\n    }\n    return this._paramMap;\n  }\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    const url = this.url.map(segment => segment.toString()).join('/');\n    const matched = this.routeConfig ? this.routeConfig.path : '';\n    return `Route(url:'${url}', path:'${matched}')`;\n  }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const snapshot: RouterStateSnapshot = state.snapshot;\n *     const root: ActivatedRouteSnapshot = snapshot.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n  /** @internal */\n  constructor(\n      /** The url from which this snapshot was created */\n      public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n    super(root);\n    setRouterState(<RouterStateSnapshot>this, root);\n  }\n\n  override toString(): string {\n    return serializeNode(this._root);\n  }\n}\n\nfunction setRouterState<U, T extends {_routerState: U}>(state: U, node: TreeNode<T>): void {\n  node.value._routerState = state;\n  node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n  const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n  return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n  if (route.snapshot) {\n    const currentSnapshot = route.snapshot;\n    const nextSnapshot = route._futureSnapshot;\n    route.snapshot = nextSnapshot;\n    if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n      (<any>route.queryParams).next(nextSnapshot.queryParams);\n    }\n    if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n      (<any>route.fragment).next(nextSnapshot.fragment);\n    }\n    if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n      (<any>route.params).next(nextSnapshot.params);\n    }\n    if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n      (<any>route.url).next(nextSnapshot.url);\n    }\n    if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n      (<any>route.data).next(nextSnapshot.data);\n    }\n  } else {\n    route.snapshot = route._futureSnapshot;\n\n    // this is for resolved data\n    (<any>route.data).next(route._futureSnapshot.data);\n  }\n}\n\n\nexport function equalParamsAndUrlSegments(\n    a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n  const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n  const parentsMismatch = !a.parent !== !b.parent;\n\n  return equalUrlParams && !parentsMismatch &&\n      (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent!));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n    routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n    prevState: RouterState): RouterState {\n  const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n  return new RouterState(root, curr);\n}\n\nfunction createNode(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n  // reuse an activated route that is currently displayed on the screen\n  if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n    const value = prevState.value;\n    value._futureSnapshot = curr.value;\n    const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n    return new TreeNode<ActivatedRoute>(value, children);\n  } else {\n    if (routeReuseStrategy.shouldAttach(curr.value)) {\n      // retrieve an activated route that is used to be displayed, but is not currently displayed\n      const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n      if (detachedRouteHandle !== null) {\n        const tree = (detachedRouteHandle as DetachedRouteHandleInternal).route;\n        setFutureSnapshotsOfActivatedRoutes(curr, tree);\n        return tree;\n      }\n    }\n\n    const value = createActivatedRoute(curr.value);\n    const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n    return new TreeNode<ActivatedRoute>(value, children);\n  }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n    curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n  if (curr.value.routeConfig !== result.value.routeConfig) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n  }\n  if (curr.children.length !== result.children.length) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n  }\n  result.value._futureSnapshot = curr.value;\n  for (let i = 0; i < curr.children.length; ++i) {\n    setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n  }\n}\n\nfunction createOrReuseChildren(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState: TreeNode<ActivatedRoute>) {\n  return curr.children.map(child => {\n    for (const p of prevState.children) {\n      if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n        return createNode(routeReuseStrategy, child, p);\n      }\n    }\n    return createNode(routeReuseStrategy, child);\n  });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n  return new ActivatedRoute(\n      new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n      new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n    route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params|null,\n    fragment: string|null): UrlTree {\n  if (commands.length === 0) {\n    return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n  }\n\n  const nav = computeNavigation(commands);\n\n  if (nav.toRoot()) {\n    return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n  }\n\n  const startingPosition = findStartingPosition(nav, urlTree, route);\n\n  const segmentGroup = startingPosition.processChildren ?\n      updateSegmentGroupChildren(\n          startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n      updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n  return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n  return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command: any): command is {outlets: {[key: string]: any}} {\n  return typeof command === 'object' && command != null && command.outlets;\n}\n\nfunction tree(\n    oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n    queryParams: Params|null, fragment: string|null): UrlTree {\n  let qp: any = {};\n  if (queryParams) {\n    forEach(queryParams, (value: any, name: any) => {\n      qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n    });\n  }\n\n  if (urlTree.root === oldSegmentGroup) {\n    return new UrlTree(newSegmentGroup, qp, fragment);\n  }\n\n  return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n    current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n    newSegment: UrlSegmentGroup): UrlSegmentGroup {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n    if (c === oldSegment) {\n      children[outletName] = newSegment;\n    } else {\n      children[outletName] = replaceSegment(c, oldSegment, newSegment);\n    }\n  });\n  return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n  constructor(\n      public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n    if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n      throw new Error('Root segment cannot have matrix parameters');\n    }\n\n    const cmdWithOutlet = commands.find(isCommandWithOutlets);\n    if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n      throw new Error('{outlets:{}} has to be the last command');\n    }\n  }\n\n  public toRoot(): boolean {\n    return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n  }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n  if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n    return new Navigation(true, 0, commands);\n  }\n\n  let numberOfDoubleDots = 0;\n  let isAbsolute = false;\n\n  const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n    if (typeof cmd === 'object' && cmd != null) {\n      if (cmd.outlets) {\n        const outlets: {[k: string]: any} = {};\n        forEach(cmd.outlets, (commands: any, name: string) => {\n          outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n        });\n        return [...res, {outlets}];\n      }\n\n      if (cmd.segmentPath) {\n        return [...res, cmd.segmentPath];\n      }\n    }\n\n    if (!(typeof cmd === 'string')) {\n      return [...res, cmd];\n    }\n\n    if (cmdIdx === 0) {\n      cmd.split('/').forEach((urlPart, partIndex) => {\n        if (partIndex == 0 && urlPart === '.') {\n          // skip './a'\n        } else if (partIndex == 0 && urlPart === '') {  //  '/a'\n          isAbsolute = true;\n        } else if (urlPart === '..') {  //  '../a'\n          numberOfDoubleDots++;\n        } else if (urlPart != '') {\n          res.push(urlPart);\n        }\n      });\n\n      return res;\n    }\n\n    return [...res, cmd];\n  }, []);\n\n  return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n  constructor(\n      public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n  }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n  if (nav.isAbsolute) {\n    return new Position(tree.root, true, 0);\n  }\n\n  if (route.snapshot._lastPathIndex === -1) {\n    const segmentGroup = route.snapshot._urlSegment;\n    // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n    // see issue #26224, #13011, #35687\n    // However, if the ActivatedRoute is the root we should process children like above.\n    const processChildren = segmentGroup === tree.root;\n    return new Position(segmentGroup, processChildren, 0);\n  }\n\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = route.snapshot._lastPathIndex + modifier;\n  return createPositionApplyingDoubleDots(\n      route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n    group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n  let g = group;\n  let ci = index;\n  let dd = numberOfDoubleDots;\n  while (dd > ci) {\n    dd -= ci;\n    g = g.parent!;\n    if (!g) {\n      throw new Error('Invalid number of \\'../\\'');\n    }\n    ci = g.segments.length;\n  }\n  return new Position(g, false, ci - dd);\n}\n\nfunction getOutlets(commands: unknown[]): {[k: string]: unknown[]|string} {\n  if (isCommandWithOutlets(commands[0])) {\n    return commands[0].outlets;\n  }\n\n  return {[PRIMARY_OUTLET]: commands};\n}\n\nfunction updateSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (!segmentGroup) {\n    segmentGroup = new UrlSegmentGroup([], {});\n  }\n  if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n    return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n  }\n\n  const m = prefixedWith(segmentGroup, startIndex, commands);\n  const slicedCommands = commands.slice(m.commandIndex);\n  if (m.match && m.pathIndex < segmentGroup.segments.length) {\n    const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n    g.children[PRIMARY_OUTLET] =\n        new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n    return updateSegmentGroupChildren(g, 0, slicedCommands);\n  } else if (m.match && slicedCommands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else if (m.match && !segmentGroup.hasChildren()) {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  } else if (m.match) {\n    return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n  } else {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  }\n}\n\nfunction updateSegmentGroupChildren(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (commands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else {\n    const outlets = getOutlets(commands);\n    const children: {[key: string]: UrlSegmentGroup} = {};\n\n    forEach(outlets, (commands, outlet) => {\n      if (typeof commands === 'string') {\n        commands = [commands];\n      }\n      if (commands !== null) {\n        children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n      }\n    });\n\n    forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n      if (outlets[childOutlet] === undefined) {\n        children[childOutlet] = child;\n      }\n    });\n    return new UrlSegmentGroup(segmentGroup.segments, children);\n  }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n  let currentCommandIndex = 0;\n  let currentPathIndex = startIndex;\n\n  const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n  while (currentPathIndex < segmentGroup.segments.length) {\n    if (currentCommandIndex >= commands.length) return noMatch;\n    const path = segmentGroup.segments[currentPathIndex];\n    const command = commands[currentCommandIndex];\n    // Do not try to consume command as part of the prefixing if it has outlets because it can\n    // contain outlets other than the one being processed. Consuming the outlets command would\n    // result in other outlets being ignored.\n    if (isCommandWithOutlets(command)) {\n      break;\n    }\n    const curr = `${command}`;\n    const next =\n        currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n    if (currentPathIndex > 0 && curr === undefined) break;\n\n    if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n      if (!compare(curr, next, path)) return noMatch;\n      currentCommandIndex += 2;\n    } else {\n      if (!compare(curr, {}, path)) return noMatch;\n      currentCommandIndex++;\n    }\n    currentPathIndex++;\n  }\n\n  return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  const paths = segmentGroup.segments.slice(0, startIndex);\n\n  let i = 0;\n  while (i < commands.length) {\n    const command = commands[i];\n    if (isCommandWithOutlets(command)) {\n      const children = createNewSegmentChildren(command.outlets);\n      return new UrlSegmentGroup(paths, children);\n    }\n\n    // if we start with an object literal, we need to reuse the path part from the segment\n    if (i === 0 && isMatrixParams(commands[0])) {\n      const p = segmentGroup.segments[startIndex];\n      paths.push(new UrlSegment(p.path, stringify(commands[0])));\n      i++;\n      continue;\n    }\n\n    const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n    const next = (i < commands.length - 1) ? commands[i + 1] : null;\n    if (curr && next && isMatrixParams(next)) {\n      paths.push(new UrlSegment(curr, stringify(next)));\n      i += 2;\n    } else {\n      paths.push(new UrlSegment(curr, {}));\n      i++;\n    }\n  }\n  return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: unknown[]|string}):\n    {[outlet: string]: UrlSegmentGroup} {\n  const children: {[outlet: string]: UrlSegmentGroup} = {};\n  forEach(outlets, (commands, outlet) => {\n    if (typeof commands === 'string') {\n      commands = [commands];\n    }\n    if (commands !== null) {\n      children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n    }\n  });\n  return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n  const res: {[key: string]: string} = {};\n  forEach(params, (v: any, k: string) => res[k] = `${v}`);\n  return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n  return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, advanceActivatedRoute, RouterState} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport const activateRoutes =\n    (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n     forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n        map(t => {\n          new ActivateRoutes(\n              routeReuseStrategy, t.targetRouterState!, t.currentRouterState, forwardEvent)\n              .activate(rootContexts);\n          return t;\n        });\n\nexport class ActivateRoutes {\n  constructor(\n      private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n      private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n  activate(parentContexts: ChildrenOutletContexts): void {\n    const futureRoot = this.futureState._root;\n    const currRoot = this.currState ? this.currState._root : null;\n\n    this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n    advanceActivatedRoute(this.futureState.root);\n    this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n  }\n\n  // De-activate the child route that are not re-used for the future state\n  private deactivateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n    // Recurse on the routes active in the future state to de-activate deeper children\n    futureNode.children.forEach(futureChild => {\n      const childOutletName = futureChild.value.outlet;\n      this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n      delete children[childOutletName];\n    });\n\n    // De-activate the routes that will not be re-used\n    forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n      this.deactivateRouteAndItsChildren(v, contexts);\n    });\n  }\n\n  private deactivateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContext: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    if (future === curr) {\n      // Reusing the node, check to see if the children need to be de-activated\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContext.getContext(future.outlet);\n        if (context) {\n          this.deactivateChildRoutes(futureNode, currNode, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.deactivateChildRoutes(futureNode, currNode, parentContext);\n      }\n    } else {\n      if (curr) {\n        // Deactivate the current route which will not be re-used\n        this.deactivateRouteAndItsChildren(currNode, parentContext);\n      }\n    }\n  }\n\n  private deactivateRouteAndItsChildren(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n      this.detachAndStoreRouteSubtree(route, parentContexts);\n    } else {\n      this.deactivateRouteAndOutlet(route, parentContexts);\n    }\n  }\n\n  private detachAndStoreRouteSubtree(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    if (context && context.outlet) {\n      const componentRef = context.outlet.detach();\n      const contexts = context.children.onOutletDeactivated();\n      this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n    }\n  }\n\n  private deactivateRouteAndOutlet(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    // The context could be `null` if we are on a componentless route but there may still be\n    // children that need deactivating.\n    const contexts = context && route.value.component ? context.children : parentContexts;\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);\n\n    for (const childOutlet of Object.keys(children)) {\n      this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n    }\n\n    if (context && context.outlet) {\n      // Destroy the component\n      context.outlet.deactivate();\n      // Destroy the contexts for all the outlets that were in the component\n      context.children.onOutletDeactivated();\n      // Clear the information about the attached component on the context but keep the reference to\n      // the outlet.\n      context.attachRef = null;\n      context.resolver = null;\n      context.route = null;\n    }\n  }\n\n  private activateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outlet: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n    futureNode.children.forEach(c => {\n      this.activateRoutes(c, children[c.value.outlet], contexts);\n      this.forwardEvent(new ActivationEnd(c.value.snapshot));\n    });\n    if (futureNode.children.length) {\n      this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n    }\n  }\n\n  private activateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContexts: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    advanceActivatedRoute(future);\n\n    // reusing the node\n    if (future === curr) {\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n        this.activateChildRoutes(futureNode, currNode, context.children);\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, currNode, parentContexts);\n      }\n    } else {\n      if (future.component) {\n        // if we have a normal route, we need to place the component into the outlet and recurse.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n\n        if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n          const stored =\n              (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n          this.routeReuseStrategy.store(future.snapshot, null);\n          context.children.onOutletReAttached(stored.contexts);\n          context.attachRef = stored.componentRef;\n          context.route = stored.route.value;\n          if (context.outlet) {\n            // Attach right away when the outlet has already been instantiated\n            // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n            context.outlet.attach(stored.componentRef, stored.route.value);\n          }\n          advanceActivatedRouteNodeAndItsChildren(stored.route);\n        } else {\n          const config = parentLoadedConfig(future.snapshot);\n          const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n          context.attachRef = null;\n          context.route = future;\n          context.resolver = cmpFactoryResolver;\n          if (context.outlet) {\n            // Activate the outlet when it has already been instantiated\n            // Otherwise it will get activated from its `ngOnInit` when instantiated\n            context.outlet.activateWith(future, cmpFactoryResolver);\n          }\n\n          this.activateChildRoutes(futureNode, null, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, null, parentContexts);\n      }\n    }\n  }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n  advanceActivatedRoute(node.value);\n  node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n    if (route && route.component) return null;\n  }\n\n  return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * Represents a route configuration for the Router service.\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\n * in `Route.children`.\n *\n * @see `Route`\n * @see `Router`\n * @see [Router configuration guide](guide/router-reference#configuration)\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * Represents the result of matching URLs with a custom matching function.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @see `UrlMatcher()`\n * @publicApi\n */\nexport type UrlMatchResult = {\n  consumed: UrlSegment[];\n  posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * A function for matching a route against URLs. Implement a custom URL matcher\n * for `Route.matcher` when a combination of `path` and `pathMatch`\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\n *\n * The function takes the following arguments and returns a `UrlMatchResult` object.\n * * *segments* : An array of URL segments.\n * * *group* : A segment group.\n * * *route* : The route to match against.\n *\n * The following example implementation matches HTML files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n    UrlMatchResult|null;\n\n/**\n *\n * Represents static data associated with a particular route.\n *\n * @see `Route#data`\n *\n * @publicApi\n */\nexport type Data = {\n  [name: string]: any\n};\n\n/**\n *\n * Represents the resolved data associated with a particular route.\n *\n * @see `Route#resolve`.\n *\n * @publicApi\n */\nexport type ResolveData = {\n  [name: string]: any\n};\n\n/**\n *\n * A function that is called to resolve a collection of lazy-loaded routes.\n * Must be an arrow function of the following form:\n * `() => import('...').then(mod => mod.MODULE)`\n *\n * For example:\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @see [Route.loadChildren](api/router/Route#loadChildren)\n * @publicApi\n */\nexport type LoadChildrenCallback = () => Type<any>|NgModuleFactory<any>|Observable<Type<any>>|\n    Promise<NgModuleFactory<any>|Type<any>|any>;\n\n/**\n *\n * A function that returns a set of routes to load.\n *\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\n * form (`LoadChildrenCallback`) should be used instead.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n */\nexport type LoadChildren = LoadChildrenCallback|DeprecatedLoadChildren;\n\n/**\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n * @deprecated The `string` form of `loadChildren` is deprecated in favor of the\n * `LoadChildrenCallback` function which uses the ES dynamic `import()` expression.\n * This offers a more natural and standards-based mechanism to dynamically\n * load an ES module at runtime.\n */\nexport type DeprecatedLoadChildren = string;\n\n/**\n *\n * How to handle query parameters in a router link.\n * One of:\n * - `merge` : Merge new with current parameters.\n * - `preserve` : Preserve current parameters.\n *\n * @see `UrlCreationOptions#queryParamsHandling`\n * @see `RouterLink`\n * @publicApi\n */\nexport type QueryParamsHandling = 'merge'|'preserve'|'';\n\n/**\n *\n * A policy for when to run guards and resolvers on a route.\n *\n * @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)\n * @publicApi\n */\nexport type RunGuardsAndResolvers =\n    'pathParamsChange'|'pathParamsOrQueryParamsChange'|'paramsChange'|'paramsOrQueryParamsChange'|\n    'always'|((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * A configuration object that defines a single route.\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\n * The router attempts to match segments of a given URL against each route,\n * using the configuration options defined in this object.\n *\n * Supports static, parameterized, redirect, and wildcard routes, as well as\n * custom route data and resolve methods.\n *\n * For detailed usage information, see the [Routing Guide](guide/router).\n *\n * @usageNotes\n *\n * ### Simple Configuration\n *\n * The following route specifies that when navigating to, for example,\n * `/team/11/user/bob`, the router creates the 'Team' component\n * with the 'User' child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n  *  component: Team,\n *   children: [{\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * ### Multiple Outlets\n *\n * The following route creates sibling components with multiple outlets.\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team\n * }, {\n *   path: 'chat/:user',\n *   component: Chat\n *   outlet: 'aux'\n * }]\n * ```\n *\n * ### Wild Cards\n *\n * The following route uses wild-card notation to specify a component\n * that is always instantiated regardless of where you navigate to.\n *\n * ```\n * [{\n *   path: '**',\n *   component: WildcardComponent\n * }]\n * ```\n *\n * ### Redirects\n *\n * The following route uses the `redirectTo` property to ignore a segment of\n * a given URL when looking for a child path.\n *\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\n * the Team component with the User child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: 'legacy/user/:name',\n *     redirectTo: 'user/:name'\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * The redirect path can be relative, as shown in this example, or absolute.\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\n * the result URL is also absolute, '/user/jim'.\n\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any URL segments.\n *\n * In the following configuration, when navigating to\n * `/team/11`, the router instantiates the 'AllUsers' component.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: AllUsers\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * Empty-path routes can have children. In the following example, when navigating\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\n * the user component in it.\n *\n * Note that an empty path route inherits its parent's parameters and data.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: WrapperCmp,\n *     children: [{\n *       path: 'user/:name',\n *       component: User\n *     }]\n *   }]\n * }]\n * ```\n *\n * ### Matching Strategy\n *\n * The default path-match strategy is 'prefix', which means that the router\n * checks URL elements from the left to see if the URL matches a specified path.\n * For example, '/team/11/user' matches 'team/:id'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'prefix', //default\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * You can specify the path-match strategy 'full' to make sure that the path\n * covers the whole unconsumed URL. It is important to do this when redirecting\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating to the redirect destination,\n * creating an endless loop.\n *\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\n * that the router applies the redirect if and only if navigating to '/'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'full',\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * You can share parameters between sibling components.\n * For example, suppose that two sibling components should go next to each other,\n * and both of them require an ID parameter. You can accomplish this using a route\n * that does not specify a component at the top level.\n *\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\n * the main child and aux child components next to each other.\n * For this to work, the application component must have the primary and aux outlets defined.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: 'a', component: MainChild },\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * The router merges the parameters, data, and resolve of the componentless\n * parent into the parameters, data, and resolve of the children.\n *\n * This is especially useful when child components are defined\n * with an empty path string, as in the following example.\n * With this configuration, navigating to '/parent/10' creates\n * the main child and aux components.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: '', component: MainChild },\n *      { path: '', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up application load time by splitting the application\n * into multiple bundles and loading them on demand.\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\n * instead of the `children` property.\n *\n * Given the following example route, the router will lazy load\n * the associated module on demand using the browser native import system.\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @publicApi\n */\nexport interface Route {\n  /**\n   * The path to match against. Cannot be used together with a custom `matcher` function.\n   * A URL string that uses router matching notation.\n   * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\n   * Default is \"/\" (the root path).\n   *\n   */\n  path?: string;\n  /**\n   * The path-matching strategy, one of 'prefix' or 'full'.\n   * Default is 'prefix'.\n   *\n   * By default, the router checks URL elements from the left to see if the URL\n   * matches a given path and stops when there is a config match. Importantly there must still be a\n   * config match for each segment of the URL. For example, '/team/11/user' matches the prefix\n   * 'team/:id' if one of the route's children matches the segment 'user'. That is, the URL\n   * '/team/11/user` matches the config\n   * `{path: 'team/:id', children: [{path: ':user', component: User}]}`\n   * but does not match when there are no children as in `{path: 'team/:id', component: Team}`.\n   *\n   * The path-match strategy 'full' matches against the entire URL.\n   * It is important to do this when redirecting empty-path routes.\n   * Otherwise, because an empty path is a prefix of any URL,\n   * the router would apply the redirect even when navigating\n   * to the redirect destination, creating an endless loop.\n   *\n   */\n  pathMatch?: string;\n  /**\n   * A custom URL-matching function. Cannot be used together with `path`.\n   */\n  matcher?: UrlMatcher;\n  /**\n   * The component to instantiate when the path matches.\n   * Can be empty if child routes specify components.\n   */\n  component?: Type<any>;\n  /**\n   * A URL to redirect to when the path matches.\n   *\n   * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\n   * Note that no further redirects are evaluated after an absolute redirect.\n   *\n   * When not present, router does not redirect.\n   */\n  redirectTo?: string;\n  /**\n   * Name of a `RouterOutlet` object where the component can be placed\n   * when the path matches.\n   */\n  outlet?: string;\n  /**\n   * An array of dependency-injection tokens used to look up `CanActivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * activate the component. By default, any user can activate.\n   */\n  canActivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanActivateChild()` handlers,\n   * in order to determine if the current user is allowed to activate\n   * a child of the component. By default, any user can activate a child.\n   */\n  canActivateChild?: any[];\n  /**\n   * An array of DI tokens used to look up `CanDeactivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * deactivate the component. By default, any user can deactivate.\n   *\n   */\n  canDeactivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanLoad()`\n   * handlers, in order to determine if the current user is allowed to\n   * load the component. By default, any user can load.\n   */\n  canLoad?: any[];\n  /**\n   * Additional developer-defined data provided to the component via\n   * `ActivatedRoute`. By default, no additional data is passed.\n   */\n  data?: Data;\n  /**\n   * A map of DI tokens used to look up data resolvers. See `Resolve`.\n   */\n  resolve?: ResolveData;\n  /**\n   * An array of child `Route` objects that specifies a nested route\n   * configuration.\n   */\n  children?: Routes;\n  /**\n   * An object specifying lazy-loaded child routes.\n   */\n  loadChildren?: LoadChildren;\n  /**\n   * Defines when guards and resolvers will be run. One of\n   * - `paramsOrQueryParamsChange` : Run when query parameters change.\n   * - `always` : Run on every execution.\n   * By default, guards and resolvers run only when the matrix\n   * parameters of the route change.\n   */\n  runGuardsAndResolvers?: RunGuardsAndResolvers;\n  /**\n   * Filled for routes with `loadChildren` once the module has been loaded\n   * @internal\n   */\n  _loadedConfig?: LoadedRouterConfig;\n  /**\n   * Filled for routes with `loadChildren` during load\n   * @internal\n   */\n  _loader$?: Observable<LoadedRouterConfig>;\n}\n\nexport class LoadedRouterConfig {\n  constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n *   return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n *   return fn(1, 2);\n * } else {\n *   throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n  return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n  return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n  return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n  return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n  return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n  return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n  return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {combineLatest, Observable, OperatorFunction} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n    OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n  return switchMap(obs => {\n    return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n               .pipe(\n                   scan(\n                       (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n                         let isPending = false;\n                         return list.reduce((innerAcc, val, i: number) => {\n                           if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n                           // Toggle pending flag if any values haven't been set yet\n                           if (val === INITIAL_VALUE) isPending = true;\n\n                           // Any other return values are only valid if we haven't yet hit a pending\n                           // call. This guarantees that in the case of a guard at the bottom of the\n                           // tree that returns a redirect, we will wait for the higher priority\n                           // guard at the top to finish before performing the redirect.\n                           if (!isPending) {\n                             // Early return when we hit a `false` value as that should always\n                             // cancel navigation\n                             if (val === false) return val;\n\n                             if (i === list.length - 1 || isUrlTree(val)) {\n                               return val;\n                             }\n                           }\n\n                           return innerAcc;\n                         }, acc);\n                       },\n                       INITIAL_VALUE),\n                   filter(item => item !== INITIAL_VALUE),\n                   map(item => isUrlTree(item) ? item : item === true),  //\n                   take(1)) as Observable<boolean|UrlTree>;\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class ɵEmptyOutletComponent {\n}\n\nexport {ɵEmptyOutletComponent as EmptyOutletComponent};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EmptyOutletComponent} from '../components/empty_outlet';\nimport {Route, Routes} from '../config';\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n  // forEach doesn't iterate undefined values\n  for (let i = 0; i < config.length; i++) {\n    const route: Route = config[i];\n    const fullPath: string = getFullPath(parentPath, route);\n    validateNode(route, fullPath);\n  }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (!route) {\n      throw new Error(`\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n    }\n    if (Array.isArray(route)) {\n      throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n    }\n    if (!route.component && !route.children && !route.loadChildren &&\n        (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n    }\n    if (route.redirectTo && route.children) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and children cannot be used together`);\n    }\n    if (route.redirectTo && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and loadChildren cannot be used together`);\n    }\n    if (route.children && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': children and loadChildren cannot be used together`);\n    }\n    if (route.redirectTo && route.component) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and component cannot be used together`);\n    }\n    if (route.redirectTo && route.canActivate) {\n      throw new Error(\n          `Invalid configuration of route '${\n              fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n          `so canActivate will never be executed.`);\n    }\n    if (route.path && route.matcher) {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n    }\n    if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n    }\n    if (route.path === void 0 && route.matcher === void 0) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': routes must have either a path or a matcher specified`);\n    }\n    if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n    }\n    if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n      const exp =\n          `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n      throw new Error(`Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${\n          route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n    }\n    if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n    }\n  }\n  if (route.children) {\n    validateConfig(route.children, fullPath);\n  }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n  if (!currentRoute) {\n    return parentPath;\n  }\n  if (!parentPath && !currentRoute.path) {\n    return '';\n  } else if (parentPath && !currentRoute.path) {\n    return `${parentPath}/`;\n  } else if (!parentPath && currentRoute.path) {\n    return currentRoute.path;\n  } else {\n    return `${parentPath}/${currentRoute.path}`;\n  }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n  const children = r.children && r.children.map(standardizeConfig);\n  const c = children ? {...r, children} : {...r};\n  if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n    c.component = EmptyOutletComponent;\n  }\n  return c;\n}\n\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nexport function getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\n\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nexport function sortByMatchingOutlets(routes: Routes, outletName: string): Routes {\n  const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n  sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n  return sortedConfig;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from '../config';\nimport {defaultUrlMatcher, PRIMARY_OUTLET} from '../shared';\nimport {UrlSegment, UrlSegmentGroup} from '../url_tree';\n\nimport {forEach} from './collection';\nimport {getOutlet} from './config';\n\nexport interface MatchResult {\n  matched: boolean;\n  consumedSegments: UrlSegment[];\n  lastChild: number;\n  parameters: {[k: string]: string};\n  positionalParamSegments: {[k: string]: UrlSegment};\n}\n\nconst noMatch: MatchResult = {\n  matched: false,\n  consumedSegments: [],\n  lastChild: 0,\n  parameters: {},\n  positionalParamSegments: {}\n};\n\nexport function match(\n    segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n  if (route.path === '') {\n    if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n      return {...noMatch};\n    }\n\n    return {\n      matched: true,\n      consumedSegments: [],\n      lastChild: 0,\n      parameters: {},\n      positionalParamSegments: {}\n    };\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n  if (!res) return {...noMatch};\n\n  const posParams: {[n: string]: string} = {};\n  forEach(res.posParams!, (v: UrlSegment, k: string) => {\n    posParams[k] = v.path;\n  });\n  const parameters = res.consumed.length > 0 ?\n      {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n      posParams;\n\n  return {\n    matched: true,\n    consumedSegments: res.consumed,\n    lastChild: res.consumed.length,\n    // TODO(atscott): investigate combining parameters and positionalParamSegments\n    parameters,\n    positionalParamSegments: res.posParams ?? {}\n  };\n}\n\nexport function split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[], relativeLinkResolution: 'legacy'|'corrected' = 'corrected') {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments,\n        createChildrenForEmptyPaths(\n            segmentGroup, consumedSegments, config,\n            new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments,\n        addEmptyPathsToChildrenIfNeeded(\n            segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children,\n            relativeLinkResolution));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments};\n  }\n\n  const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n  s._sourceSegment = segmentGroup;\n  s._segmentIndexShift = consumedSegments.length;\n  return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    routes: Route[], children: {[name: string]: UrlSegmentGroup},\n    relativeLinkResolution: 'legacy'|'corrected'): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  for (const r of routes) {\n    if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      if (relativeLinkResolution === 'legacy') {\n        s._segmentIndexShift = segmentGroup.segments.length;\n      } else {\n        s._segmentIndexShift = consumedSegments.length;\n      }\n      res[getOutlet(r)] = s;\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n    primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegment;\n  primarySegment._sourceSegment = segmentGroup;\n  primarySegment._segmentIndexShift = consumedSegments.length;\n\n  for (const r of routes) {\n    if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      s._segmentIndexShift = consumedSegments.length;\n      res[getOutlet(r)] = s;\n    }\n  }\n  return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '';\n}\n\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nexport function isImmediateMatch(\n    route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n  // a config like\n  // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n  // or even\n  // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n  //\n  // The exception here is when the segment outlet is for the primary outlet. This would\n  // result in a match inside the named outlet because all children there are written as primary\n  // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n  // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n  // This should only match if the url is `/(x:b)`.\n  if (getOutlet(route) !== outlet &&\n      (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n    return false;\n  }\n  if (route.path === '**') {\n    return true;\n  }\n  return match(rawSegment, route, segments).matched;\n}\n\nexport function noLeftoversInUrl(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  return segments.length === 0 && !segmentGroup.children[outlet];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, from, Observable, Observer, of} from 'rxjs';\nimport {catchError, concatMap, first, last, map, mergeMap, scan, tap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {prioritizedGuardValue} from './operators/prioritized_guard_value';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {navigationCancelingError, Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, wrapIntoObservable} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {isCanLoad, isFunction, isUrlTree} from './utils/type_guards';\n\nclass NoMatch {\n  public segmentGroup: UrlSegmentGroup|null;\n\n  constructor(segmentGroup?: UrlSegmentGroup) {\n    this.segmentGroup = segmentGroup || null;\n  }\n}\n\nclass AbsoluteRedirect {\n  constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n          `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n  return new Observable<LoadedRouterConfig>(\n      (obs: Observer<LoadedRouterConfig>) => obs.error(\n          navigationCancelingError(`Cannot load children because the guard of the route \"path: '${\n              route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n  return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n  private allowRedirects: boolean = true;\n  private ngModule: NgModuleRef<any>;\n\n  constructor(\n      moduleInjector: Injector, private configLoader: RouterConfigLoader,\n      private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n    this.ngModule = moduleInjector.get(NgModuleRef);\n  }\n\n  apply(): Observable<UrlTree> {\n    const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n    // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is\n    // only necessary to prevent failures in tests which assert exact object matches. The `split` is\n    // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these\n    // properties. Before the implementations were merged, the `applyRedirects` would not assign\n    // them. We should be able to remove this logic as a \"breaking change\" but should do some more\n    // investigation into the failures first.\n    const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children);\n\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    const urlTrees$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n    }));\n    return urlTrees$.pipe(catchError((e: any) => {\n      if (e instanceof AbsoluteRedirect) {\n        // After an absolute redirect we do not apply any more redirects!\n        // If this implementation changes, update the documentation note in `redirectTo`.\n        this.allowRedirects = false;\n        // we need to run matching, so we can fetch all lazy-loaded modules\n        return this.match(e.urlTree);\n      }\n\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private match(tree: UrlTree): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n    const mapped$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n    }));\n    return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private noMatchError(e: NoMatch): any {\n    return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n  }\n\n  private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string|null):\n      UrlTree {\n    const root = rootCandidate.segments.length > 0 ?\n        new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n        rootCandidate;\n    return new UrlTree(root, queryParams, fragment);\n  }\n\n  private expandSegmentGroup(\n      ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n      outlet: string): Observable<UrlSegmentGroup> {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.expandChildren(ngModule, routes, segmentGroup)\n          .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n    }\n\n    return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n  }\n\n  // Recursively expand segment groups for all the child outlets\n  private expandChildren(\n      ngModule: NgModuleRef<any>, routes: Route[],\n      segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n    // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n    // because an absolute redirect from the primary outlet takes precedence.\n    const childOutlets: string[] = [];\n    for (const child of Object.keys(segmentGroup.children)) {\n      if (child === 'primary') {\n        childOutlets.unshift(child);\n      } else {\n        childOutlets.push(child);\n      }\n    }\n\n    return from(childOutlets)\n        .pipe(\n            concatMap(childOutlet => {\n              const child = segmentGroup.children[childOutlet];\n              // Sort the routes so routes with outlets that match the segment appear\n              // first, followed by routes for other outlets, which might match if they have an\n              // empty path.\n              const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n              return this.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet)\n                  .pipe(map(s => ({segment: s, outlet: childOutlet})));\n            }),\n            scan(\n                (children, expandedChild) => {\n                  children[expandedChild.outlet] = expandedChild.segment;\n                  return children;\n                },\n                {} as {[outlet: string]: UrlSegmentGroup}),\n            last(),\n        );\n  }\n\n  private expandSegment(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n      segments: UrlSegment[], outlet: string,\n      allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    return from(routes).pipe(\n        concatMap((r: any) => {\n          const expanded$ = this.expandSegmentAgainstRoute(\n              ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n          return expanded$.pipe(catchError((e: any) => {\n            if (e instanceof NoMatch) {\n              return of(null);\n            }\n            throw e;\n          }));\n        }),\n        first((s): s is UrlSegmentGroup => !!s), catchError((e: any, _: any) => {\n          if (e instanceof EmptyError || e.name === 'EmptyError') {\n            if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n              return of(new UrlSegmentGroup([], {}));\n            }\n            throw new NoMatch(segmentGroup);\n          }\n          throw e;\n        }));\n  }\n\n  private expandSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n      return noMatch(segmentGroup);\n    }\n\n    if (route.redirectTo === undefined) {\n      return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet);\n    }\n\n    if (allowRedirects && this.allowRedirects) {\n      return this.expandSegmentAgainstRouteUsingRedirect(\n          ngModule, segmentGroup, routes, route, paths, outlet);\n    }\n\n    return noMatch(segmentGroup);\n  }\n\n  private expandSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n          ngModule, routes, route, outlet);\n    }\n\n    return this.expandRegularSegmentAgainstRouteUsingRedirect(\n        ngModule, segmentGroup, routes, route, segments, outlet);\n  }\n\n  private expandWildCardWithParamsAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n      outlet: string): Observable<UrlSegmentGroup> {\n    const newTree = this.applyRedirectCommands([], route.redirectTo!, {});\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      const group = new UrlSegmentGroup(newSegments, {});\n      return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n    }));\n  }\n\n  private expandRegularSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    const {matched, consumedSegments, lastChild, positionalParamSegments} =\n        match(segmentGroup, route, segments);\n    if (!matched) return noMatch(segmentGroup);\n\n    const newTree =\n        this.applyRedirectCommands(consumedSegments, route.redirectTo!, positionalParamSegments);\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      return this.expandSegment(\n          ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n          false);\n    }));\n  }\n\n  private matchSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      if (route.loadChildren) {\n        const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                              this.configLoader.load(ngModule.injector, route);\n        return loaded$.pipe(map((cfg: LoadedRouterConfig) => {\n          route._loadedConfig = cfg;\n          return new UrlSegmentGroup(segments, {});\n        }));\n      }\n\n      return of(new UrlSegmentGroup(segments, {}));\n    }\n\n    const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n    if (!matched) return noMatch(rawSegmentGroup);\n\n    const rawSlicedSegments = segments.slice(lastChild);\n    const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n    return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n      const childModule = routerConfig.module;\n      const childConfig = routerConfig.routes;\n\n      const {segmentGroup: splitSegmentGroup, slicedSegments} =\n          split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n      // See comment on the other call to `split` about why this is necessary.\n      const segmentGroup =\n          new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n\n      if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n        const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n        return expanded$.pipe(\n            map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n      }\n\n      if (childConfig.length === 0 && slicedSegments.length === 0) {\n        return of(new UrlSegmentGroup(consumedSegments, {}));\n      }\n\n      const matchedOnOutlet = getOutlet(route) === outlet;\n      const expanded$ = this.expandSegment(\n          childModule, segmentGroup, childConfig, slicedSegments,\n          matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n      return expanded$.pipe(\n          map((cs: UrlSegmentGroup) =>\n                  new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n    }));\n  }\n\n  private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n      Observable<LoadedRouterConfig> {\n    if (route.children) {\n      // The children belong to the same module\n      return of(new LoadedRouterConfig(route.children, ngModule));\n    }\n\n    if (route.loadChildren) {\n      // lazy children belong to the loaded module\n      if (route._loadedConfig !== undefined) {\n        return of(route._loadedConfig);\n      }\n\n      return this.runCanLoadGuards(ngModule.injector, route, segments)\n          .pipe(mergeMap((shouldLoadResult: boolean) => {\n            if (shouldLoadResult) {\n              return this.configLoader.load(ngModule.injector, route)\n                  .pipe(map((cfg: LoadedRouterConfig) => {\n                    route._loadedConfig = cfg;\n                    return cfg;\n                  }));\n            }\n            return canLoadFails(route);\n          }));\n    }\n\n    return of(new LoadedRouterConfig([], ngModule));\n  }\n\n  private runCanLoadGuards(moduleInjector: Injector, route: Route, segments: UrlSegment[]):\n      Observable<boolean> {\n    const canLoad = route.canLoad;\n    if (!canLoad || canLoad.length === 0) return of(true);\n\n    const canLoadObservables = canLoad.map((injectionToken: any) => {\n      const guard = moduleInjector.get(injectionToken);\n      let guardVal;\n      if (isCanLoad(guard)) {\n        guardVal = guard.canLoad(route, segments);\n      } else if (isFunction<CanLoadFn>(guard)) {\n        guardVal = guard(route, segments);\n      } else {\n        throw new Error('Invalid CanLoad guard');\n      }\n      return wrapIntoObservable(guardVal);\n    });\n\n    return of(canLoadObservables)\n        .pipe(\n            prioritizedGuardValue(),\n            tap((result: UrlTree|boolean) => {\n              if (!isUrlTree(result)) return;\n\n              const error: Error&{url?: UrlTree} = navigationCancelingError(\n                  `Redirecting to \"${this.urlSerializer.serialize(result)}\"`);\n              error.url = result;\n              throw error;\n            }),\n            map(result => result === true),\n        );\n  }\n\n  private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n    let res: UrlSegment[] = [];\n    let c = urlTree.root;\n    while (true) {\n      res = res.concat(c.segments);\n      if (c.numberOfChildren === 0) {\n        return of(res);\n      }\n\n      if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n        return namedOutletsRedirect(route.redirectTo!);\n      }\n\n      c = c.children[PRIMARY_OUTLET];\n    }\n  }\n\n  private applyRedirectCommands(\n      segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n    return this.applyRedirectCreatreUrlTree(\n        redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n  }\n\n  private applyRedirectCreatreUrlTree(\n      redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlTree {\n    const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n    return new UrlTree(\n        newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n        urlTree.fragment);\n  }\n\n  private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n    const res: Params = {};\n    forEach(redirectToParams, (v: any, k: string) => {\n      const copySourceValue = typeof v === 'string' && v.startsWith(':');\n      if (copySourceValue) {\n        const sourceName = v.substring(1);\n        res[k] = actualParams[sourceName];\n      } else {\n        res[k] = v;\n      }\n    });\n    return res;\n  }\n\n  private createSegmentGroup(\n      redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n    const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n    let children: {[n: string]: UrlSegmentGroup} = {};\n    forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n      children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n    });\n\n    return new UrlSegmentGroup(updatedSegments, children);\n  }\n\n  private createSegments(\n      redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n    return redirectToSegments.map(\n        s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n                                      this.findOrReturn(s, actualSegments));\n  }\n\n  private findPosParam(\n      redirectTo: string, redirectToUrlSegment: UrlSegment,\n      posParams: {[k: string]: UrlSegment}): UrlSegment {\n    const pos = posParams[redirectToUrlSegment.path.substring(1)];\n    if (!pos)\n      throw new Error(\n          `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n    return pos;\n  }\n\n  private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n    let idx = 0;\n    for (const s of actualSegments) {\n      if (s.path === redirectToUrlSegment.path) {\n        actualSegments.splice(idx);\n        return s;\n      }\n      idx++;\n    }\n    return redirectToUrlSegment;\n  }\n}\n\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n  if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n    const c = s.children[PRIMARY_OUTLET];\n    return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n  }\n\n  return s;\n}\n\n/**\n * Recursively merges primary segment children into their parents and also drops empty children\n * (those which have no segments and no children themselves). The latter prevents serializing a\n * group into something like `/a(aux:)`, where `aux` is an empty child segment.\n */\nfunction squashSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  const newChildren = {} as any;\n  for (const childOutlet of Object.keys(segmentGroup.children)) {\n    const child = segmentGroup.children[childOutlet];\n    const childCandidate = squashSegmentGroup(child);\n    // don't add empty children\n    if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n      newChildren[childOutlet] = childCandidate;\n    }\n  }\n  const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n  return mergeTrivialChildren(s);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n  return switchMap(\n      t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n               .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, equalParamsAndUrlSegments, RouterStateSnapshot} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport class CanActivate {\n  readonly route: ActivatedRouteSnapshot;\n  constructor(public path: ActivatedRouteSnapshot[]) {\n    this.route = this.path[this.path.length - 1];\n  }\n}\n\nexport class CanDeactivate {\n  constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n  canDeactivateChecks: CanDeactivate[],\n  canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n    future: RouterStateSnapshot, curr: RouterStateSnapshot,\n    parentContexts: ChildrenOutletContexts) {\n  const futureRoot = future._root;\n  const currRoot = curr ? curr._root : null;\n\n  return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n    {node: ActivatedRouteSnapshot, guards: any[]}|null {\n  const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n  if (!canActivateChild || canActivateChild.length === 0) return null;\n  return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n    token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n  const config = getClosestLoadedConfig(snapshot);\n  const injector = config ? config.module.injector : moduleInjector;\n  return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  if (!snapshot) return null;\n\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n  }\n\n  return null;\n}\n\nfunction getChildRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>|null,\n    contexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[], checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const prevChildren = nodeChildrenAsMap(currNode);\n\n  // Process the children of the future route\n  futureNode.children.forEach(c => {\n    getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n    delete prevChildren[c.value.outlet];\n  });\n\n  // Process any children left from the current route (not active for the future route)\n  forEach(\n      prevChildren,\n      (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n          deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks));\n\n  return checks;\n}\n\nfunction getRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n    parentContexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[],\n    checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const future = futureNode.value;\n  const curr = currNode ? currNode.value : null;\n  const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n  // reusing the node\n  if (curr && future.routeConfig === curr.routeConfig) {\n    const shouldRun =\n        shouldRunGuardsAndResolvers(curr, future, future.routeConfig!.runGuardsAndResolvers);\n    if (shouldRun) {\n      checks.canActivateChecks.push(new CanActivate(futurePath));\n    } else {\n      // we need to set the data\n      future.data = curr.data;\n      future._resolvedData = curr._resolvedData;\n    }\n\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(\n          futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n    }\n\n    if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n      checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n    }\n  } else {\n    if (curr) {\n      deactivateRouteAndItsChildren(currNode, context, checks);\n    }\n\n    checks.canActivateChecks.push(new CanActivate(futurePath));\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n    }\n  }\n\n  return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n    curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n    mode: RunGuardsAndResolvers|undefined): boolean {\n  if (typeof mode === 'function') {\n    return mode(curr, future);\n  }\n  switch (mode) {\n    case 'pathParamsChange':\n      return !equalPath(curr.url, future.url);\n\n    case 'pathParamsOrQueryParamsChange':\n      return !equalPath(curr.url, future.url) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'always':\n      return true;\n\n    case 'paramsOrQueryParamsChange':\n      return !equalParamsAndUrlSegments(curr, future) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'paramsChange':\n    default:\n      return !equalParamsAndUrlSegments(curr, future);\n  }\n}\n\nfunction deactivateRouteAndItsChildren(\n    route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext|null, checks: Checks): void {\n  const children = nodeChildrenAsMap(route);\n  const r = route.value;\n\n  forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n    if (!r.component) {\n      deactivateRouteAndItsChildren(node, context, checks);\n    } else if (context) {\n      deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n    } else {\n      deactivateRouteAndItsChildren(node, null, checks);\n    }\n  });\n\n  if (!r.component) {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  } else if (context && context.outlet && context.outlet.isActivated) {\n    checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n  } else {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {concat, defer, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n    MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n    if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n      return of({...t, guardsResult: true});\n    }\n\n    return runCanDeactivateChecks(\n               canDeactivateChecks, targetSnapshot!, currentSnapshot, moduleInjector)\n        .pipe(\n            mergeMap(canDeactivate => {\n              return canDeactivate && isBoolean(canDeactivate) ?\n                  runCanActivateChecks(\n                      targetSnapshot!, canActivateChecks, moduleInjector, forwardEvent) :\n                  of(canDeactivate);\n            }),\n            map(guardsResult => ({...t, guardsResult})));\n  });\n}\n\nfunction runCanDeactivateChecks(\n    checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n    moduleInjector: Injector) {\n  return from(checks).pipe(\n      mergeMap(\n          check =>\n              runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n    futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n    forwardEvent?: (evt: Event) => void) {\n  return from(checks).pipe(\n      concatMap((check: CanActivate) => {\n        return concat(\n            fireChildActivationStart(check.route.parent, forwardEvent),\n            fireActivationStart(check.route, forwardEvent),\n            runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n            runCanActivate(futureSnapshot, check.route, moduleInjector));\n      }),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ActivationStart(snapshot));\n  }\n  return of(true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ChildActivationStart(snapshot));\n  }\n  return of(true);\n}\n\nfunction runCanActivate(\n    futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n  if (!canActivate || canActivate.length === 0) return of(true);\n\n  const canActivateObservables = canActivate.map((c: any) => {\n    return defer(() => {\n      const guard = getToken(c, futureARS, moduleInjector);\n      let observable;\n      if (isCanActivate(guard)) {\n        observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n      } else if (isFunction<CanActivateFn>(guard)) {\n        observable = wrapIntoObservable(guard(futureARS, futureRSS));\n      } else {\n        throw new Error('Invalid CanActivate guard');\n      }\n      return observable.pipe(first());\n    });\n  });\n  return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n    futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const futureARS = path[path.length - 1];\n\n  const canActivateChildGuards = path.slice(0, path.length - 1)\n                                     .reverse()\n                                     .map(p => getCanActivateChild(p))\n                                     .filter(_ => _ !== null);\n\n  const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n    return defer(() => {\n      const guardsMapped = d.guards.map((c: any) => {\n        const guard = getToken(c, d.node, moduleInjector);\n        let observable;\n        if (isCanActivateChild(guard)) {\n          observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n        } else if (isFunction<CanActivateChildFn>(guard)) {\n          observable = wrapIntoObservable(guard(futureARS, futureRSS));\n        } else {\n          throw new Error('Invalid CanActivateChild guard');\n        }\n        return observable.pipe(first());\n      });\n      return of(guardsMapped).pipe(prioritizedGuardValue());\n    });\n  });\n  return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n    component: Object|null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n    futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n  if (!canDeactivate || canDeactivate.length === 0) return of(true);\n  const canDeactivateObservables = canDeactivate.map((c: any) => {\n    const guard = getToken(c, currARS, moduleInjector);\n    let observable;\n    if (isCanDeactivate(guard)) {\n      observable = wrapIntoObservable(guard.canDeactivate(component!, currARS, currRSS, futureRSS));\n    } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n      observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n    } else {\n      throw new Error('Invalid CanDeactivate guard');\n    }\n    return observable.pipe(first());\n  });\n  return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of} from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, ParamsInheritanceStrategy, RouterStateSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {last} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nfunction newObservableError(e: unknown): Observable<RouterStateSnapshot> {\n  // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n  return new Observable<RouterStateSnapshot>((obs: Observer<RouterStateSnapshot>) => obs.error(e));\n}\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Routes, urlTree: UrlTree, url: string,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n    relativeLinkResolution: 'legacy'|'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n  try {\n    const result = new Recognizer(\n                       rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n                       relativeLinkResolution)\n                       .recognize();\n    if (result === null) {\n      return newObservableError(new NoMatch());\n    } else {\n      return of(result);\n    }\n  } catch (e) {\n    // Catch the potential error from recognize due to duplicate outlet matches and return as an\n    // `Observable` error instead.\n    return newObservableError(e);\n  }\n}\n\nexport class Recognizer {\n  constructor(\n      private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n      private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n      private relativeLinkResolution: 'legacy'|'corrected') {}\n\n  recognize(): RouterStateSnapshot|null {\n    const rootSegmentGroup =\n        split(\n            this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined),\n            this.relativeLinkResolution)\n            .segmentGroup;\n\n    const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    if (children === null) {\n      return null;\n    }\n\n    // Use Object.freeze to prevent readers of the Router state from modifying it outside of a\n    // navigation, resulting in the router being out of sync with the browser.\n    const root = new ActivatedRouteSnapshot(\n        [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n        {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n\n    const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n    const routeState = new RouterStateSnapshot(this.url, rootNode);\n    this.inheritParamsAndData(routeState._root);\n    return routeState;\n  }\n\n  inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n    const route = routeNode.value;\n\n    const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n    route.params = Object.freeze(i.params);\n    route.data = Object.freeze(i.data);\n\n    routeNode.children.forEach(n => this.inheritParamsAndData(n));\n  }\n\n  processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.processChildren(config, segmentGroup);\n    }\n\n    return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n  }\n\n  /**\n   * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n   * we cannot find a match for _any_ of the children.\n   *\n   * @param config - The `Routes` to match against\n   * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n   *     config.\n   */\n  processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    const children: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n    for (const childOutlet of Object.keys(segmentGroup.children)) {\n      const child = segmentGroup.children[childOutlet];\n      // Sort the config so that routes with outlets that match the one being activated appear\n      // first, followed by routes for other outlets, which might match if they have an empty path.\n      const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n      const outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet);\n      if (outletChildren === null) {\n        // Configs must match all segment children so because we did not find a match for this\n        // outlet, return `null`.\n        return null;\n      }\n      children.push(...outletChildren);\n    }\n    // Because we may have matched two outlets to the same empty path segment, we can have multiple\n    // activated results for the same outlet. We should merge the children of these results so the\n    // final return value is only one `TreeNode` per outlet.\n    const mergedChildren = mergeEmptyPathMatches(children);\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      // This should really never happen - we are only taking the first match for each outlet and\n      // merge the empty path matches.\n      checkOutletNameUniqueness(mergedChildren);\n    }\n    sortActivatedRouteSnapshots(mergedChildren);\n    return mergedChildren;\n  }\n\n  processSegment(\n      config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    for (const r of config) {\n      const children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n      if (children !== null) {\n        return children;\n      }\n    }\n    if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n      return [];\n    }\n\n    return null;\n  }\n\n  processSegmentAgainstRoute(\n      route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return null;\n\n    let snapshot: ActivatedRouteSnapshot;\n    let consumedSegments: UrlSegment[] = [];\n    let rawSlicedSegments: UrlSegment[] = [];\n\n    if (route.path === '**') {\n      const params = segments.length > 0 ? last(segments)!.parameters : {};\n      snapshot = new ActivatedRouteSnapshot(\n          segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n          getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length,\n          getResolve(route));\n    } else {\n      const result = match(rawSegment, route, segments);\n      if (!result.matched) {\n        return null;\n      }\n      consumedSegments = result.consumedSegments;\n      rawSlicedSegments = segments.slice(result.lastChild);\n\n      snapshot = new ActivatedRouteSnapshot(\n          consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment, getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n    }\n\n    const childConfig: Route[] = getChildConfig(route);\n\n    const {segmentGroup, slicedSegments} = split(\n        rawSegment, consumedSegments, rawSlicedSegments,\n        // Filter out routes with redirectTo because we are trying to create activated route\n        // snapshots and don't handle redirects here. That should have been done in\n        // `applyRedirects`.\n        childConfig.filter(c => c.redirectTo === undefined), this.relativeLinkResolution);\n\n    if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n      const children = this.processChildren(childConfig, segmentGroup);\n      if (children === null) {\n        return null;\n      }\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n    }\n\n    if (childConfig.length === 0 && slicedSegments.length === 0) {\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n    }\n\n    const matchedOnOutlet = getOutlet(route) === outlet;\n    // If we matched a config due to empty path match on a different outlet, we need to continue\n    // passing the current outlet for the segment rather than switch to PRIMARY.\n    // Note that we switch to primary when we have a match because outlet configs look like this:\n    // {path: 'a', outlet: 'a', children: [\n    //  {path: 'b', component: B},\n    //  {path: 'c', component: C},\n    // ]}\n    // Notice that the children of the named outlet are configured with the primary outlet\n    const children = this.processSegment(\n        childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet);\n    if (children === null) {\n      return null;\n    }\n    return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n  }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  nodes.sort((a, b) => {\n    if (a.value.outlet === PRIMARY_OUTLET) return -1;\n    if (b.value.outlet === PRIMARY_OUTLET) return 1;\n    return a.value.outlet.localeCompare(b.value.outlet);\n  });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n  if (route.children) {\n    return route.children;\n  }\n\n  if (route.loadChildren) {\n    return route._loadedConfig!.routes;\n  }\n\n  return [];\n}\n\nfunction hasEmptyPathConfig(node: TreeNode<ActivatedRouteSnapshot>) {\n  const config = node.value.routeConfig;\n  return config && config.path === '' && config.redirectTo === undefined;\n}\n\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the\n * children from each duplicate. This is necessary because different outlets can match a single\n * empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes: Array<TreeNode<ActivatedRouteSnapshot>>):\n    Array<TreeNode<ActivatedRouteSnapshot>> {\n  const result: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n  // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n  const mergedNodes: Set<TreeNode<ActivatedRouteSnapshot>> = new Set();\n\n  for (const node of nodes) {\n    if (!hasEmptyPathConfig(node)) {\n      result.push(node);\n      continue;\n    }\n\n    const duplicateEmptyPathNode =\n        result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n    if (duplicateEmptyPathNode !== undefined) {\n      duplicateEmptyPathNode.children.push(...node.children);\n      mergedNodes.add(duplicateEmptyPathNode);\n    } else {\n      result.push(node);\n    }\n  }\n  // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n  // by also merging those children. This is necessary when there are multiple empty path configs in\n  // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n  // of those children can be combined into a single node as well.\n  for (const mergedNode of mergedNodes) {\n    const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n    result.push(new TreeNode(mergedNode.value, mergedChildren));\n  }\n  return result.filter(n => !mergedNodes.has(n));\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  const names: {[k: string]: ActivatedRouteSnapshot} = {};\n  nodes.forEach(n => {\n    const routeWithSameOutletName = names[n.value.outlet];\n    if (routeWithSameOutletName) {\n      const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n      const c = n.value.url.map(s => s.toString()).join('/');\n      throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n    }\n    names[n.value.outlet] = n.value;\n  });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  let s = segmentGroup;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n  }\n  return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n  let s = segmentGroup;\n  let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  }\n  return res - 1;\n}\n\nfunction getData(route: Route): Data {\n  return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n  return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Route[], serializer: (url: UrlTree) => string,\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    relativeLinkResolution: 'legacy'|'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(\n      t => recognizeFn(\n               rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n               paramsInheritanceStrategy, relativeLinkResolution)\n               .pipe(map(targetSnapshot => ({...t, targetSnapshot}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {EMPTY, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, map, mergeMap, takeLast, tap} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, RouterStateSnapshot} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n    if (!canActivateChecks.length) {\n      return of(t);\n    }\n    let canActivateChecksResolved = 0;\n    return from(canActivateChecks)\n        .pipe(\n            concatMap(\n                check => runResolve(\n                    check.route, targetSnapshot!, paramsInheritanceStrategy, moduleInjector)),\n            tap(() => canActivateChecksResolved++),\n            takeLast(1),\n            mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY),\n        );\n  });\n}\n\nfunction runResolve(\n    futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    paramsInheritanceStrategy: 'emptyOnly'|'always', moduleInjector: Injector) {\n  const resolve = futureARS._resolve;\n  return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n      .pipe(map((resolvedData: any) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = {\n          ...futureARS.data,\n          ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve\n        };\n        return null;\n      }));\n}\n\nfunction resolveNode(\n    resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const keys = Object.keys(resolve);\n  if (keys.length === 0) {\n    return of({});\n  }\n  const data: {[k: string]: any} = {};\n  return from(keys).pipe(\n      mergeMap(\n          (key: string) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n                               .pipe(tap((value: any) => {\n                                 data[key] = value;\n                               }))),\n      takeLast(1),\n      mergeMap(() => {\n        // Ensure all resolvers returned values, otherwise don't emit any \"next\" and just complete\n        // the chain which will cancel navigation\n        if (Object.keys(data).length === keys.length) {\n          return of(data);\n        }\n        return EMPTY;\n      }),\n  );\n}\n\nfunction getResolver(\n    injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const resolver = getToken(injectionToken, futureARS, moduleInjector);\n  return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n                            wrapIntoObservable(resolver(futureARS, futureRSS));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {from, MonoTypeOperatorFunction, ObservableInput, of} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n    MonoTypeOperatorFunction<T> {\n  return switchMap(v => {\n    const nextResult = next(v);\n    if (nextResult) {\n      return from(nextResult).pipe(map(() => v));\n    }\n    return of(v);\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n  contexts: Map<string, OutletContext>,\n  componentRef: ComponentRef<any>,\n  route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n  /** Determines if this route (and its subtree) should be detached to be reused later */\n  abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n  /**\n   * Stores the detached route.\n   *\n   * Storing a `null` value should erase the previously stored value.\n   */\n  abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n  /** Determines if this route (and its subtree) should be reattached */\n  abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n  /** Retrieves the previously stored route */\n  abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n  /** Determines if a route should be reused */\n  abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the fragment or query parameters change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nexport abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\n  /**\n   * Whether the given route should detach for later reuse.\n   * Always returns false for `BaseRouteReuseStrategy`.\n   * */\n  shouldDetach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /**\n   * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n   */\n  store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n\n  /** Returns `false`, meaning the route (and its subtree) is never reattached */\n  shouldAttach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /** Returns `null` because this strategy does not store routes for later re-use. */\n  retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null {\n    return null;\n  }\n\n  /**\n   * Determines if a route should be reused.\n   * This strategy returns `true` when the future route config and current route config are\n   * identical.\n   */\n  shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n    return future.routeConfig === curr.routeConfig;\n  }\n}\n\nexport class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectFlags, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {ConnectableObservable, from, Observable, of, Subject} from 'rxjs';\nimport {catchError, map, mergeMap, refCount, tap} from 'rxjs/operators';\n\nimport {LoadChildren, LoadedRouterConfig, Route} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\nimport {standardizeConfig} from './utils/config';\n\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n  constructor(\n      private loader: NgModuleFactoryLoader, private compiler: Compiler,\n      private onLoadStartListener?: (r: Route) => void,\n      private onLoadEndListener?: (r: Route) => void) {}\n\n  load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n    if (route._loader$) {\n      return route._loader$;\n    }\n\n    if (this.onLoadStartListener) {\n      this.onLoadStartListener(route);\n    }\n    const moduleFactory$ = this.loadModuleFactory(route.loadChildren!);\n    const loadRunner = moduleFactory$.pipe(\n        map((factory: NgModuleFactory<any>) => {\n          if (this.onLoadEndListener) {\n            this.onLoadEndListener(route);\n          }\n          const module = factory.create(parentInjector);\n          // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n          // will get stuck in an infinite loop. The child module's Injector will look to\n          // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n          // for it's parent module instead.\n          return new LoadedRouterConfig(\n              flatten(\n                  module.injector.get(ROUTES, undefined, InjectFlags.Self | InjectFlags.Optional))\n                  .map(standardizeConfig),\n              module);\n        }),\n        catchError((err) => {\n          route._loader$ = undefined;\n          throw err;\n        }),\n    );\n    // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n    route._loader$ = new ConnectableObservable(loadRunner, () => new Subject<LoadedRouterConfig>())\n                         .pipe(refCount());\n    return route._loader$;\n  }\n\n  private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n    if (typeof loadChildren === 'string') {\n      return from(this.loader.load(loadChildren));\n    } else {\n      return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n        if (t instanceof NgModuleFactory) {\n          return of(t);\n        } else {\n          return from(this.compiler.compileModuleAsync(t));\n        }\n      }));\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutletContract} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n  outlet: RouterOutletContract|null = null;\n  route: ActivatedRoute|null = null;\n  resolver: ComponentFactoryResolver|null = null;\n  children = new ChildrenOutletContexts();\n  attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n  // contexts for child outlets, by name.\n  private contexts = new Map<string, OutletContext>();\n\n  /** Called when a `RouterOutlet` directive is instantiated */\n  onChildOutletCreated(childName: string, outlet: RouterOutletContract): void {\n    const context = this.getOrCreateContext(childName);\n    context.outlet = outlet;\n    this.contexts.set(childName, context);\n  }\n\n  /**\n   * Called when a `RouterOutlet` directive is destroyed.\n   * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n   * re-created later.\n   */\n  onChildOutletDestroyed(childName: string): void {\n    const context = this.getContext(childName);\n    if (context) {\n      context.outlet = null;\n      context.attachRef = null;\n    }\n  }\n\n  /**\n   * Called when the corresponding route is deactivated during navigation.\n   * Because the component get destroyed, all children outlet are destroyed.\n   */\n  onOutletDeactivated(): Map<string, OutletContext> {\n    const contexts = this.contexts;\n    this.contexts = new Map();\n    return contexts;\n  }\n\n  onOutletReAttached(contexts: Map<string, OutletContext>) {\n    this.contexts = contexts;\n  }\n\n  getOrCreateContext(childName: string): OutletContext {\n    let context = this.getContext(childName);\n\n    if (!context) {\n      context = new OutletContext();\n      this.contexts.set(childName, context);\n    }\n\n    return context;\n  }\n\n  getContext(childName: string): OutletContext|null {\n    return this.contexts.get(childName) || null;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n  /**\n   * Tells the router if this URL should be processed.\n   *\n   * When it returns true, the router will execute the regular navigation.\n   * When it returns false, the router will set the router state to an empty state.\n   * As a result, all the active components will be destroyed.\n   *\n   */\n  abstract shouldProcessUrl(url: UrlTree): boolean;\n\n  /**\n   * Extracts the part of the URL that should be handled by the router.\n   * The rest of the URL will remain untouched.\n   */\n  abstract extract(url: UrlTree): UrlTree;\n\n  /**\n   * Merges the URL fragment with the rest of the URL.\n   */\n  abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n  shouldProcessUrl(url: UrlTree): boolean {\n    return true;\n  }\n  extract(url: UrlTree): UrlTree {\n    return url;\n  }\n  merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree {\n    return newUrlPart;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, PopStateEvent} from '@angular/common';\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, of, Subject, SubscriptionLike} from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, createEmptyState, RouterState, RouterStateSnapshot} from './router_state';\nimport {isNavigationCancelingError, navigationCancelingError, Params} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {containsTree, createEmptyUrlTree, IsActiveMatchOptions, UrlSerializer, UrlTree} from './url_tree';\nimport {standardizeConfig, validateConfig} from './utils/config';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n/**\n * @description\n *\n * Options that modify the `Router` URL.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface UrlCreationOptions {\n  /**\n   * Specifies a root URI to use for relative navigation.\n   *\n   * For example, consider the following route configuration where the parent route\n   * has two children.\n   *\n   * ```\n   * [{\n   *   path: 'parent',\n   *   component: ParentComponent,\n   *   children: [{\n   *     path: 'list',\n   *     component: ListComponent\n   *   },{\n   *     path: 'child',\n   *     component: ChildComponent\n   *   }]\n   * }]\n   * ```\n   *\n   * The following `go()` function navigates to the `list` route by\n   * interpreting the destination URI as relative to the activated `child`  route\n   *\n   * ```\n   *  @Component({...})\n   *  class ChildComponent {\n   *    constructor(private router: Router, private route: ActivatedRoute) {}\n   *\n   *    go() {\n   *      this.router.navigate(['../list'], { relativeTo: this.route });\n   *    }\n   *  }\n   * ```\n   *\n   * A value of `null` or `undefined` indicates that the navigation commands should be applied\n   * relative to the root.\n   */\n  relativeTo?: ActivatedRoute|null;\n\n  /**\n   * Sets query parameters to the URL.\n   *\n   * ```\n   * // Navigate to /results?page=1\n   * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n   * ```\n   */\n  queryParams?: Params|null;\n\n  /**\n   * Sets the hash fragment for the URL.\n   *\n   * ```\n   * // Navigate to /results#top\n   * this.router.navigate(['/results'], { fragment: 'top' });\n   * ```\n   */\n  fragment?: string;\n\n  /**\n   * How to handle query parameters in the router link for the next navigation.\n   * One of:\n   * * `preserve` : Preserve current parameters.\n   * * `merge` : Merge new with current parameters.\n   *\n   * The \"preserve\" option discards any new query params:\n   * ```\n   * // from /view1?page=1 to/view2?page=1\n   * this.router.navigate(['/view2'], { queryParams: { page: 2 },  queryParamsHandling: \"preserve\"\n   * });\n   * ```\n   * The \"merge\" option appends new query params to the params from the current URL:\n   * ```\n   * // from /view1?page=1 to/view2?page=1&otherKey=2\n   * this.router.navigate(['/view2'], { queryParams: { otherKey: 2 },  queryParamsHandling: \"merge\"\n   * });\n   * ```\n   * In case of a key collision between current parameters and those in the `queryParams` object,\n   * the new value is used.\n   *\n   */\n  queryParamsHandling?: QueryParamsHandling|null;\n\n  /**\n   * When true, preserves the URL fragment for the next navigation\n   *\n   * ```\n   * // Preserve fragment from /results#top to /view#top\n   * this.router.navigate(['/view'], { preserveFragment: true });\n   * ```\n   */\n  preserveFragment?: boolean;\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the navigation should be handled.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface NavigationBehaviorOptions {\n  /**\n   * When true, navigates without pushing a new state into history.\n   *\n   * ```\n   * // Navigate silently to /view\n   * this.router.navigate(['/view'], { skipLocationChange: true });\n   * ```\n   */\n  skipLocationChange?: boolean;\n\n  /**\n   * When true, navigates while replacing the current state in history.\n   *\n   * ```\n   * // Navigate to /view\n   * this.router.navigate(['/view'], { replaceUrl: true });\n   * ```\n   */\n  replaceUrl?: boolean;\n\n  /**\n   * Developer-defined state that can be passed to any navigation.\n   * Access this value through the `Navigation.extras` object\n   * returned from the [Router.getCurrentNavigation()\n   * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\n   *\n   * After a navigation completes, the router writes an object containing this\n   * value together with a `navigationId` to `history.state`.\n   * The value is written when `location.go()` or `location.replaceState()`\n   * is called before activating this route.\n   *\n   * Note that `history.state` does not pass an object equality test because\n   * the router adds the `navigationId` on each navigation.\n   *\n   */\n  state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed or interpreted.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n * @see UrlCreationOptions\n * @see NavigationBehaviorOptions\n *\n * @publicApi\n */\nexport interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {}\n\n/**\n * Error handler that is invoked when a navigation error occurs.\n *\n * If the handler returns a value, the navigation Promise is resolved with this value.\n * If the handler throws an exception, the navigation Promise is rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n  throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n    error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n  return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n  [k: string]: any,\n  // TODO(#27607): Remove `navigationId` and `ɵrouterPageId` and move to `ng` or `ɵ` namespace.\n  navigationId: number,\n  // The `ɵ` prefix is there to reduce the chance of colliding with any existing user properties on\n  // the history state.\n  ɵrouterPageId?: number,\n};\n\n/**\n * Information about a navigation operation.\n * Retrieve the most recent navigation object with the\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\n *\n * * *id* : The unique identifier of the current navigation.\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\n * This is the value before the router has parsed or applied redirects to it.\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\n * * *finalUrl* : The extracted URL after redirects have been applied.\n * This URL may not be available immediately, therefore this property can be `undefined`.\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\n * * *trigger* : Identifies how this navigation was triggered.\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n * -- 'popstate'--Triggered by a popstate event.\n * -- 'hashchange'--Triggered by a hashchange event.\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\n * navigation.\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\n * own `previousNavigation`.\n *\n * @publicApi\n */\nexport interface Navigation {\n  /**\n   * The unique identifier of the current navigation.\n   */\n  id: number;\n  /**\n   * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\n   * the value before the router has parsed or applied redirects to it.\n   */\n  initialUrl: string|UrlTree;\n  /**\n   * The initial target URL after being parsed with `UrlSerializer.extract()`.\n   */\n  extractedUrl: UrlTree;\n  /**\n   * The extracted URL after redirects have been applied.\n   * This URL may not be available immediately, therefore this property can be `undefined`.\n   * It is guaranteed to be set after the `RoutesRecognized` event fires.\n   */\n  finalUrl?: UrlTree;\n  /**\n   * Identifies how this navigation was triggered.\n   *\n   * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n   * * 'popstate'--Triggered by a popstate event.\n   * * 'hashchange'--Triggered by a hashchange event.\n   */\n  trigger: 'imperative'|'popstate'|'hashchange';\n  /**\n   * Options that controlled the strategy used for this navigation.\n   * See `NavigationExtras`.\n   */\n  extras: NavigationExtras;\n  /**\n   * The previously successful `Navigation` object. Only one previous navigation\n   * is available, therefore this previous `Navigation` object has a `null` value\n   * for its own `previousNavigation`.\n   */\n  previousNavigation: Navigation|null;\n}\n\nexport type NavigationTransition = {\n  id: number,\n  targetPageId: number,\n  currentUrlTree: UrlTree,\n  currentRawUrl: UrlTree,\n  extractedUrl: UrlTree,\n  urlAfterRedirects: UrlTree,\n  rawUrl: UrlTree,\n  extras: NavigationExtras,\n  resolve: any,\n  reject: any,\n  promise: Promise<boolean>,\n  source: NavigationTrigger,\n  restoredState: RestoredState|null,\n  currentSnapshot: RouterStateSnapshot,\n  targetSnapshot: RouterStateSnapshot|null,\n  currentRouterState: RouterState,\n  targetRouterState: RouterState|null,\n  guards: Checks,\n  guardsResult: boolean|UrlTree|null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}): Observable<void> {\n  return of(null) as any;\n}\n\n/**\n * Information related to a location change, necessary for scheduling follow-up Router navigations.\n */\ntype LocationChangeInfo = {\n  source: 'popstate'|'hashchange',\n  urlTree: UrlTree,\n  state: RestoredState|null,\n  transitionId: number\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nexport const exactMatchOptions: IsActiveMatchOptions = {\n  paths: 'exact',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'exact'\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nexport const subsetMatchOptions: IsActiveMatchOptions = {\n  paths: 'subset',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'subset'\n};\n\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Injectable()\nexport class Router {\n  /**\n   * Represents the activated `UrlTree` that the `Router` is configured to handle (through\n   * `UrlHandlingStrategy`). That is, after we find the route config tree that we're going to\n   * activate, run guards, and are just about to activate the route, we set the currentUrlTree.\n   *\n   * This should match the `browserUrlTree` when a navigation succeeds. If the\n   * `UrlHandlingStrategy.shouldProcessUrl` is `false`, only the `browserUrlTree` is updated.\n   */\n  private currentUrlTree: UrlTree;\n  /**\n   * Meant to represent the entire browser url after a successful navigation. In the life of a\n   * navigation transition:\n   * 1. The rawUrl represents the full URL that's being navigated to\n   * 2. We apply redirects, which might only apply to _part_ of the URL (due to\n   * `UrlHandlingStrategy`).\n   * 3. Right before activation (because we assume activation will succeed), we update the\n   * rawUrlTree to be a combination of the urlAfterRedirects (again, this might only apply to part\n   * of the initial url) and the rawUrl of the transition (which was the original navigation url in\n   * its full form).\n   */\n  private rawUrlTree: UrlTree;\n  /**\n   * Meant to represent the part of the browser url that the `Router` is set up to handle (via the\n   * `UrlHandlingStrategy`). This value is updated immediately after the browser url is updated (or\n   * the browser url update is skipped via `skipLocationChange`). With that, note that\n   * `browserUrlTree` _may not_ reflect the actual browser URL for two reasons:\n   *\n   * 1. `UrlHandlingStrategy` only handles part of the URL\n   * 2. `skipLocationChange` does not update the browser url.\n   *\n   * So to reiterate, `browserUrlTree` only represents the Router's internal understanding of the\n   * current route, either before guards with `urlUpdateStrategy === 'eager'` or right before\n   * activation with `'deferred'`.\n   *\n   * This should match the `currentUrlTree` when the navigation succeeds.\n   */\n  private browserUrlTree: UrlTree;\n  private readonly transitions: BehaviorSubject<NavigationTransition>;\n  private navigations: Observable<NavigationTransition>;\n  private lastSuccessfulNavigation: Navigation|null = null;\n  private currentNavigation: Navigation|null = null;\n  private disposed = false;\n\n  private locationSubscription?: SubscriptionLike;\n  /**\n   * Tracks the previously seen location change from the location subscription so we can compare\n   * the two latest to see if they are duplicates. See setUpLocationChangeListener.\n   */\n  private lastLocationChangeInfo: LocationChangeInfo|null = null;\n  private navigationId: number = 0;\n\n  /**\n   * The id of the currently active page in the router.\n   * Updated to the transition's target id on a successful navigation.\n   *\n   * This is used to track what page the router last activated. When an attempted navigation fails,\n   * the router can then use this to compute how to restore the state back to the previously active\n   * page.\n   */\n  private currentPageId: number = 0;\n  /**\n   * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n   * important for computing the target page id for new navigations because we need to ensure each\n   * page id in the browser history is 1 more than the previous entry.\n   */\n  private get browserPageId(): number|undefined {\n    return (this.location.getState() as RestoredState | null)?.ɵrouterPageId;\n  }\n  private configLoader: RouterConfigLoader;\n  private ngModule: NgModuleRef<any>;\n  private console: Console;\n  private isNgZoneEnabled: boolean = false;\n\n  /**\n   * An event stream for routing events in this NgModule.\n   */\n  public readonly events: Observable<Event> = new Subject<Event>();\n  /**\n   * The current state of routing in this NgModule.\n   */\n  public readonly routerState: RouterState;\n\n  /**\n   * A handler for navigation errors in this NgModule.\n   */\n  errorHandler: ErrorHandler = defaultErrorHandler;\n\n  /**\n   * A handler for errors thrown by `Router.parseUrl(url)`\n   * when `url` contains an invalid character.\n   * The most common case is a `%` sign\n   * that's not encoded and is not part of a percent encoded sequence.\n   */\n  malformedUriErrorHandler:\n      (error: URIError, urlSerializer: UrlSerializer,\n       url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n  /**\n   * True if at least one navigation event has occurred,\n   * false otherwise.\n   */\n  navigated: boolean = false;\n  private lastSuccessfulId: number = -1;\n\n  /**\n   * Hooks that enable you to pause navigation,\n   * either before or after the preactivation phase.\n   * Used by `RouterModule`.\n   *\n   * @internal\n   */\n  hooks: {\n    beforePreactivation: RouterHook,\n    afterPreactivation: RouterHook\n  } = {beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook};\n\n  /**\n   * A strategy for extracting and merging URLs.\n   * Used for AngularJS to Angular migrations.\n   */\n  urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n  /**\n   * A strategy for re-using routes.\n   */\n  routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n  /**\n   * How to handle a navigation request to the current URL. One of:\n   *\n   * - `'ignore'` :  The router ignores the request.\n   * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\n   *\n   * Note that this only configures whether the Route reprocesses the URL and triggers related\n   * action and events like redirects, guards, and resolvers. By default, the router re-uses a\n   * component instance when it re-navigates to the same component type without visiting a different\n   * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload\n   * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`\n   * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.\n   */\n  onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n  /**\n   * How to merge parameters, data, and resolved data from parent to child\n   * routes. One of:\n   *\n   * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n   * for path-less or component-less routes.\n   * - `'always'` : Inherit parent parameters, data, and resolved data\n   * for all child routes.\n   */\n  paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n  /**\n   * Determines when the router updates the browser URL.\n   * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n   * Set to `'eager'` to update the browser URL at the beginning of navigation.\n   * You can choose to update early so that, if navigation fails,\n   * you can show an error message with the URL that failed.\n   */\n  urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * @see `RouterModule`\n   */\n  relativeLinkResolution: 'legacy'|'corrected' = 'corrected';\n\n  /**\n   * Configures how the Router attempts to restore state when a navigation is cancelled.\n   *\n   * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n   * router before the navigation started.\n   *\n   * 'computed' - Will always return to the same state that corresponds to the actual Angular route\n   * when the navigation gets cancelled right after triggering a `popstate` event.\n   *\n   * The default value is `replace`\n   *\n   * @internal\n   */\n  // TODO(atscott): Determine how/when/if to make this public API\n  // This shouldn’t be an option at all but may need to be in order to allow migration without a\n  // breaking change. We need to determine if it should be made into public api (or if we forgo\n  // the option and release as a breaking change bug fix in a major version).\n  canceledNavigationResolution: 'replace'|'computed' = 'replace';\n\n  /**\n   * Creates the router service.\n   */\n  // TODO: vsavkin make internal after the final is out.\n  constructor(\n      private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n      private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n      loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n    const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n    const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.ngModule = injector.get(NgModuleRef);\n    this.console = injector.get(Console);\n    const ngZone = injector.get(NgZone);\n    this.isNgZoneEnabled = ngZone instanceof NgZone && NgZone.isInAngularZone();\n\n    this.resetConfig(config);\n    this.currentUrlTree = createEmptyUrlTree();\n    this.rawUrlTree = this.currentUrlTree;\n    this.browserUrlTree = this.currentUrlTree;\n\n    this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n    this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n    this.transitions = new BehaviorSubject<NavigationTransition>({\n      id: 0,\n      targetPageId: 0,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.currentUrlTree,\n      extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      rawUrl: this.currentUrlTree,\n      extras: {},\n      resolve: null,\n      reject: null,\n      promise: Promise.resolve(true),\n      source: 'imperative',\n      restoredState: null,\n      currentSnapshot: this.routerState.snapshot,\n      targetSnapshot: null,\n      currentRouterState: this.routerState,\n      targetRouterState: null,\n      guards: {canActivateChecks: [], canDeactivateChecks: []},\n      guardsResult: null,\n    });\n    this.navigations = this.setupNavigations(this.transitions);\n\n    this.processNavigations();\n  }\n\n  private setupNavigations(transitions: Observable<NavigationTransition>):\n      Observable<NavigationTransition> {\n    const eventsSubject = (this.events as Subject<Event>);\n    return transitions.pipe(\n               filter(t => t.id !== 0),\n\n               // Extract URL\n               map(t =>\n                       ({...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)} as\n                        NavigationTransition)),\n\n               // Using switchMap so we cancel executing navigations when a new one comes in\n               switchMap(t => {\n                 let completed = false;\n                 let errored = false;\n                 return of(t).pipe(\n                     // Store the Navigation object\n                     tap(t => {\n                       this.currentNavigation = {\n                         id: t.id,\n                         initialUrl: t.currentRawUrl,\n                         extractedUrl: t.extractedUrl,\n                         trigger: t.source,\n                         extras: t.extras,\n                         previousNavigation: this.lastSuccessfulNavigation ?\n                             {...this.lastSuccessfulNavigation, previousNavigation: null} :\n                             null\n                       };\n                     }),\n                     switchMap(t => {\n                       const browserUrlTree = this.browserUrlTree.toString();\n                       const urlTransition = !this.navigated ||\n                           t.extractedUrl.toString() !== browserUrlTree ||\n                           // Navigations which succeed or ones which fail and are cleaned up\n                           // correctly should result in `browserUrlTree` and `currentUrlTree`\n                           // matching. If this is not the case, assume something went wrong and try\n                           // processing the URL again.\n                           browserUrlTree !== this.currentUrlTree.toString();\n                       const processCurrentUrl =\n                           (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n                           this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n\n                       if (processCurrentUrl) {\n                         // If the source of the navigation is from a browser event, the URL is\n                         // already updated. We already need to sync the internal state.\n                         if (isBrowserTriggeredNavigation(t.source)) {\n                           this.browserUrlTree = t.extractedUrl;\n                         }\n                         return of(t).pipe(\n                             // Fire NavigationStart event\n                             switchMap(t => {\n                               const transition = this.transitions.getValue();\n                               eventsSubject.next(new NavigationStart(\n                                   t.id, this.serializeUrl(t.extractedUrl), t.source,\n                                   t.restoredState));\n                               if (transition !== this.transitions.getValue()) {\n                                 return EMPTY;\n                               }\n\n                               // This delay is required to match old behavior that forced\n                               // navigation to always be async\n                               return Promise.resolve(t);\n                             }),\n\n                             // ApplyRedirects\n                             applyRedirects(\n                                 this.ngModule.injector, this.configLoader, this.urlSerializer,\n                                 this.config),\n\n                             // Update the currentNavigation\n                             tap(t => {\n                               this.currentNavigation = {\n                                 ...this.currentNavigation!,\n                                 finalUrl: t.urlAfterRedirects\n                               };\n                             }),\n\n                             // Recognize\n                             recognize(\n                                 this.rootComponentType, this.config,\n                                 (url) => this.serializeUrl(url), this.paramsInheritanceStrategy,\n                                 this.relativeLinkResolution),\n\n                             // Update URL if in `eager` update mode\n                             tap(t => {\n                               if (this.urlUpdateStrategy === 'eager') {\n                                 if (!t.extras.skipLocationChange) {\n                                   this.setBrowserUrl(t.urlAfterRedirects, t);\n                                   // TODO(atscott): The above line is incorrect. It sets the url to\n                                   // only the part that is handled by the router. It should merge\n                                   // that with the rawUrl so the url includes segments not handled\n                                   // by the router:\n                                   //  const rawUrl = this.urlHandlingStrategy.merge(\n                                   //      t.urlAfterRedirects, t.rawUrl);\n                                   //  this.setBrowserUrl(rawUrl, t);\n                                 }\n                                 this.browserUrlTree = t.urlAfterRedirects;\n                               }\n\n                               // Fire RoutesRecognized\n                               const routesRecognized = new RoutesRecognized(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               eventsSubject.next(routesRecognized);\n                             }));\n                       } else {\n                         const processPreviousUrl = urlTransition && this.rawUrlTree &&\n                             this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n                         /* When the current URL shouldn't be processed, but the previous one was,\n                          * we handle this \"error condition\" by navigating to the previously\n                          * successful URL, but leaving the URL intact.*/\n                         if (processPreviousUrl) {\n                           const {id, extractedUrl, source, restoredState, extras} = t;\n                           const navStart = new NavigationStart(\n                               id, this.serializeUrl(extractedUrl), source, restoredState);\n                           eventsSubject.next(navStart);\n                           const targetSnapshot =\n                               createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n                           return of({\n                             ...t,\n                             targetSnapshot,\n                             urlAfterRedirects: extractedUrl,\n                             extras: {...extras, skipLocationChange: false, replaceUrl: false},\n                           });\n                         } else {\n                           /* When neither the current or previous URL can be processed, do nothing\n                            * other than update router's internal reference to the current \"settled\"\n                            * URL. This way the next navigation will be coming from the current URL\n                            * in the browser.\n                            */\n                           this.rawUrlTree = t.rawUrl;\n                           this.browserUrlTree = t.urlAfterRedirects;\n                           t.resolve(null);\n                           return EMPTY;\n                         }\n                       }\n                     }),\n\n                     // Before Preactivation\n                     switchTap(t => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.beforePreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     // --- GUARDS ---\n                     tap(t => {\n                       const guardsStart = new GuardsCheckStart(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                       this.triggerEvent(guardsStart);\n                     }),\n\n                     map(t => ({\n                           ...t,\n                           guards: getAllRouteGuards(\n                               t.targetSnapshot!, t.currentSnapshot, this.rootContexts)\n                         })),\n\n                     checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n                     tap(t => {\n                       if (isUrlTree(t.guardsResult)) {\n                         const error: Error&{url?: UrlTree} = navigationCancelingError(\n                             `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n                         error.url = t.guardsResult;\n                         throw error;\n                       }\n\n                       const guardsEnd = new GuardsCheckEnd(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!,\n                           !!t.guardsResult);\n                       this.triggerEvent(guardsEnd);\n                     }),\n\n                     filter(t => {\n                       if (!t.guardsResult) {\n                         this.restoreHistory(t);\n                         this.cancelNavigationTransition(t, '');\n                         return false;\n                       }\n                       return true;\n                     }),\n\n                     // --- RESOLVE ---\n                     switchTap(t => {\n                       if (t.guards.canActivateChecks.length) {\n                         return of(t).pipe(\n                             tap(t => {\n                               const resolveStart = new ResolveStart(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveStart);\n                             }),\n                             switchMap(t => {\n                               let dataResolved = false;\n                               return of(t).pipe(\n                                   resolveData(\n                                       this.paramsInheritanceStrategy, this.ngModule.injector),\n                                   tap({\n                                     next: () => dataResolved = true,\n                                     complete: () => {\n                                       if (!dataResolved) {\n                                         this.restoreHistory(t);\n                                         this.cancelNavigationTransition(\n                                             t,\n                                             `At least one route resolver didn't emit any value.`);\n                                       }\n                                     }\n                                   }),\n                               );\n                             }),\n                             tap(t => {\n                               const resolveEnd = new ResolveEnd(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveEnd);\n                             }));\n                       }\n                       return undefined;\n                     }),\n\n                     // --- AFTER PREACTIVATION ---\n                     switchTap((t: NavigationTransition) => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.afterPreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     map((t: NavigationTransition) => {\n                       const targetRouterState = createRouterState(\n                           this.routeReuseStrategy, t.targetSnapshot!, t.currentRouterState);\n                       return ({...t, targetRouterState});\n                     }),\n\n                     /* Once here, we are about to activate syncronously. The assumption is this\n                        will succeed, and user code may read from the Router service. Therefore\n                        before activation, we need to update router properties storing the current\n                        URL and the RouterState, as well as updated the browser URL. All this should\n                        happen *before* activating. */\n                     tap((t: NavigationTransition) => {\n                       this.currentUrlTree = t.urlAfterRedirects;\n                       this.rawUrlTree =\n                           this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n\n                       (this as {routerState: RouterState}).routerState = t.targetRouterState!;\n\n                       if (this.urlUpdateStrategy === 'deferred') {\n                         if (!t.extras.skipLocationChange) {\n                           this.setBrowserUrl(this.rawUrlTree, t);\n                         }\n                         this.browserUrlTree = t.urlAfterRedirects;\n                       }\n                     }),\n\n                     activateRoutes(\n                         this.rootContexts, this.routeReuseStrategy,\n                         (evt: Event) => this.triggerEvent(evt)),\n\n                     tap({\n                       next() {\n                         completed = true;\n                       },\n                       complete() {\n                         completed = true;\n                       }\n                     }),\n                     finalize(() => {\n                       /* When the navigation stream finishes either through error or success, we\n                        * set the `completed` or `errored` flag. However, there are some situations\n                        * where we could get here without either of those being set. For instance, a\n                        * redirect during NavigationStart. Therefore, this is a catch-all to make\n                        * sure the NavigationCancel\n                        * event is fired when a navigation gets cancelled but not caught by other\n                        * means. */\n                       if (!completed && !errored) {\n                         const cancelationReason = `Navigation ID ${\n                             t.id} is not equal to the current navigation id ${this.navigationId}`;\n                         if (this.canceledNavigationResolution === 'replace') {\n                           // Must reset to current URL tree here to ensure history.state is set. On\n                           // a fresh page load, if a new navigation comes in before a successful\n                           // navigation completes, there will be nothing in\n                           // history.state.navigationId. This can cause sync problems with\n                           // AngularJS sync code which looks for a value here in order to determine\n                           // whether or not to handle a given popstate event or to leave it to the\n                           // Angular router.\n                           this.restoreHistory(t);\n                           this.cancelNavigationTransition(t, cancelationReason);\n                         } else {\n                           // We cannot trigger a `location.historyGo` if the\n                           // cancellation was due to a new navigation before the previous could\n                           // complete. This is because `location.historyGo` triggers a `popstate`\n                           // which would also trigger another navigation. Instead, treat this as a\n                           // redirect and do not reset the state.\n                           this.cancelNavigationTransition(t, cancelationReason);\n                           // TODO(atscott): The same problem happens here with a fresh page load\n                           // and a new navigation before that completes where we won't set a page\n                           // id.\n                         }\n                       }\n                       // currentNavigation should always be reset to null here. If navigation was\n                       // successful, lastSuccessfulTransition will have already been set. Therefore\n                       // we can safely set currentNavigation to null here.\n                       this.currentNavigation = null;\n                     }),\n                     catchError((e) => {\n                       // TODO(atscott): The NavigationTransition `t` used here does not accurately\n                       // reflect the current state of the whole transition because some operations\n                       // return a new object rather than modifying the one in the outermost\n                       // `switchMap`.\n                       //  The fix can likely be to:\n                       //  1. Rename the outer `t` variable so it's not shadowed all the time and\n                       //  confusing\n                       //  2. Keep reassigning to the outer variable after each stage to ensure it\n                       //  gets updated. Or change the implementations to not return a copy.\n                       // Not changed yet because it affects existing code and would need to be\n                       // tested more thoroughly.\n                       errored = true;\n                       /* This error type is issued during Redirect, and is handled as a\n                        * cancellation rather than an error. */\n                       if (isNavigationCancelingError(e)) {\n                         const redirecting = isUrlTree(e.url);\n                         if (!redirecting) {\n                           // Set property only if we're not redirecting. If we landed on a page and\n                           // redirect to `/` route, the new navigation is going to see the `/`\n                           // isn't a change from the default currentUrlTree and won't navigate.\n                           // This is only applicable with initial navigation, so setting\n                           // `navigated` only when not redirecting resolves this scenario.\n                           this.navigated = true;\n                           this.restoreHistory(t, true);\n                         }\n                         const navCancel = new NavigationCancel(\n                             t.id, this.serializeUrl(t.extractedUrl), e.message);\n                         eventsSubject.next(navCancel);\n\n                         // When redirecting, we need to delay resolving the navigation\n                         // promise and push it to the redirect navigation\n                         if (!redirecting) {\n                           t.resolve(false);\n                         } else {\n                           // setTimeout is required so this navigation finishes with\n                           // the return EMPTY below. If it isn't allowed to finish\n                           // processing, there can be multiple navigations to the same\n                           // URL.\n                           setTimeout(() => {\n                             const mergedTree =\n                                 this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);\n                             const extras = {\n                               skipLocationChange: t.extras.skipLocationChange,\n                               // The URL is already updated at this point if we have 'eager' URL\n                               // updates or if the navigation was triggered by the browser (back\n                               // button, URL bar, etc). We want to replace that item in history if\n                               // the navigation is rejected.\n                               replaceUrl: this.urlUpdateStrategy === 'eager' ||\n                                   isBrowserTriggeredNavigation(t.source)\n                             };\n\n                             this.scheduleNavigation(\n                                 mergedTree, 'imperative', null, extras,\n                                 {resolve: t.resolve, reject: t.reject, promise: t.promise});\n                           }, 0);\n                         }\n\n                         /* All other errors should reset to the router's internal URL reference to\n                          * the pre-error state. */\n                       } else {\n                         this.restoreHistory(t, true);\n                         const navError =\n                             new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n                         eventsSubject.next(navError);\n                         try {\n                           t.resolve(this.errorHandler(e));\n                         } catch (ee) {\n                           t.reject(ee);\n                         }\n                       }\n                       return EMPTY;\n                     }));\n                 // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n               })) as any as Observable<NavigationTransition>;\n  }\n\n  /**\n   * @internal\n   * TODO: this should be removed once the constructor of the router made internal\n   */\n  resetRootComponentType(rootComponentType: Type<any>): void {\n    this.rootComponentType = rootComponentType;\n    // TODO: vsavkin router 4.0 should make the root component set to null\n    // this will simplify the lifecycle of the router.\n    this.routerState.root.component = this.rootComponentType;\n  }\n\n  private getTransition(): NavigationTransition {\n    const transition = this.transitions.value;\n    // TODO(atscott): This comment doesn't make it clear why this value needs to be set. In the case\n    // described below (where we don't handle previous or current url), the `browserUrlTree` is set\n    // to the `urlAfterRedirects` value. However, these values *are already the same* because of the\n    // line below. So it seems that we should be able to remove the line below and the line where\n    // `browserUrlTree` is updated when we aren't handling any part of the navigation url.\n    // Run TGP to confirm that this can be done.\n\n    // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n    // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n    // processing the previous URL.\n    transition.urlAfterRedirects = this.browserUrlTree;\n    return transition;\n  }\n\n  private setTransition(t: Partial<NavigationTransition>): void {\n    this.transitions.next({...this.getTransition(), ...t});\n  }\n\n  /**\n   * Sets up the location change listener and performs the initial navigation.\n   */\n  initialNavigation(): void {\n    this.setUpLocationChangeListener();\n    if (this.navigationId === 0) {\n      this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n    }\n  }\n\n  /**\n   * Sets up the location change listener. This listener detects navigations triggered from outside\n   * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n   * navigation so that the correct events, guards, etc. are triggered.\n   */\n  setUpLocationChangeListener(): void {\n    // Don't need to use Zone.wrap any more, because zone.js\n    // already patch onPopState, so location change callback will\n    // run into ngZone\n    if (!this.locationSubscription) {\n      this.locationSubscription = this.location.subscribe(event => {\n        const currentChange = this.extractLocationChangeInfoFromEvent(event);\n        // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n        // hybrid apps.\n        if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) {\n          setTimeout(() => {\n            const {source, state, urlTree} = currentChange;\n            const extras: NavigationExtras = {replaceUrl: true};\n            if (state) {\n              const stateCopy = {...state} as Partial<RestoredState>;\n              delete stateCopy.navigationId;\n              delete stateCopy.ɵrouterPageId;\n              if (Object.keys(stateCopy).length !== 0) {\n                extras.state = stateCopy;\n              }\n            }\n            this.scheduleNavigation(urlTree, source, state, extras);\n          }, 0);\n        }\n        this.lastLocationChangeInfo = currentChange;\n      });\n    }\n  }\n\n  /** Extracts router-related information from a `PopStateEvent`. */\n  private extractLocationChangeInfoFromEvent(change: PopStateEvent): LocationChangeInfo {\n    return {\n      source: change['type'] === 'popstate' ? 'popstate' : 'hashchange',\n      urlTree: this.parseUrl(change['url']!),\n      // Navigations coming from Angular router have a navigationId state\n      // property. When this exists, restore the state.\n      state: change.state?.navigationId ? change.state : null,\n      transitionId: this.getTransition().id\n    } as const;\n  }\n\n  /**\n   * Determines whether two events triggered by the Location subscription are due to the same\n   * navigation. The location subscription can fire two events (popstate and hashchange) for a\n   * single navigation. The second one should be ignored, that is, we should not schedule another\n   * navigation in the Router.\n   */\n  private shouldScheduleNavigation(previous: LocationChangeInfo|null, current: LocationChangeInfo):\n      boolean {\n    if (!previous) return true;\n\n    const sameDestination = current.urlTree.toString() === previous.urlTree.toString();\n    const eventsOccurredAtSameTime = current.transitionId === previous.transitionId;\n    if (!eventsOccurredAtSameTime || !sameDestination) {\n      return true;\n    }\n\n    if ((current.source === 'hashchange' && previous.source === 'popstate') ||\n        (current.source === 'popstate' && previous.source === 'hashchange')) {\n      return false;\n    }\n\n    return true;\n  }\n\n  /** The current URL. */\n  get url(): string {\n    return this.serializeUrl(this.currentUrlTree);\n  }\n\n  /**\n   * Returns the current `Navigation` object when the router is navigating,\n   * and `null` when idle.\n   */\n  getCurrentNavigation(): Navigation|null {\n    return this.currentNavigation;\n  }\n\n  /** @internal */\n  triggerEvent(event: Event): void {\n    (this.events as Subject<Event>).next(event);\n  }\n\n  /**\n   * Resets the route configuration used for navigation and generating links.\n   *\n   * @param config The route array for the new configuration.\n   *\n   * @usageNotes\n   *\n   * ```\n   * router.resetConfig([\n   *  { path: 'team/:id', component: TeamCmp, children: [\n   *    { path: 'simple', component: SimpleCmp },\n   *    { path: 'user/:name', component: UserCmp }\n   *  ]}\n   * ]);\n   * ```\n   */\n  resetConfig(config: Routes): void {\n    validateConfig(config);\n    this.config = config.map(standardizeConfig);\n    this.navigated = false;\n    this.lastSuccessfulId = -1;\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.dispose();\n  }\n\n  /** Disposes of the router. */\n  dispose(): void {\n    this.transitions.complete();\n    if (this.locationSubscription) {\n      this.locationSubscription.unsubscribe();\n      this.locationSubscription = undefined;\n    }\n    this.disposed = true;\n  }\n\n  /**\n   * Appends URL segments to the current URL tree to create a new URL tree.\n   *\n   * @param commands An array of URL fragments with which to construct the new URL tree.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\n   * property of the options object, if supplied.\n   * @param navigationExtras Options that control the navigation strategy.\n   * @returns The new URL tree.\n   *\n   * @usageNotes\n   *\n   * ```\n   * // create /team/33/user/11\n   * router.createUrlTree(['/team', 33, 'user', 11]);\n   *\n   * // create /team/33;expand=true/user/11\n   * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n   *\n   * // you can collapse static segments like this (this works only with the first passed-in value):\n   * router.createUrlTree(['/team/33/user', userId]);\n   *\n   * // If the first segment can contain slashes, and you do not want the router to split it,\n   * // you can do the following:\n   * router.createUrlTree([{segmentPath: '/one/two'}]);\n   *\n   * // create /team/33/(user/11//right:chat)\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n   *\n   * // remove the right secondary node\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n   *\n   * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n   *\n   * // navigate to /team/33/user/11/details\n   * router.createUrlTree(['details'], {relativeTo: route});\n   *\n   * // navigate to /team/33/user/22\n   * router.createUrlTree(['../22'], {relativeTo: route});\n   *\n   * // navigate to /team/44/user/22\n   * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n   *\n   * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n   * tree should be created relative to the root.\n   * ```\n   */\n  createUrlTree(commands: any[], navigationExtras: UrlCreationOptions = {}): UrlTree {\n    const {relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment} =\n        navigationExtras;\n    const a = relativeTo || this.routerState.root;\n    const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n    let q: Params|null = null;\n    switch (queryParamsHandling) {\n      case 'merge':\n        q = {...this.currentUrlTree.queryParams, ...queryParams};\n        break;\n      case 'preserve':\n        q = this.currentUrlTree.queryParams;\n        break;\n      default:\n        q = queryParams || null;\n    }\n    if (q !== null) {\n      q = this.removeEmptyProps(q);\n    }\n    return createUrlTree(a, this.currentUrlTree, commands, q, f ?? null);\n  }\n\n  /**\n   * Navigates to a view using an absolute route path.\n   *\n   * @param url An absolute path for a defined route. The function does not apply any delta to the\n   *     current URL.\n   * @param extras An object containing properties that modify the navigation strategy.\n   *\n   * @returns A Promise that resolves to 'true' when navigation succeeds,\n   * to 'false' when navigation fails, or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to an absolute path.\n   *\n   * ```\n   * router.navigateByUrl(\"/team/33/user/11\");\n   *\n   * // Navigate without updating the URL\n   * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigateByUrl(url: string|UrlTree, extras: NavigationBehaviorOptions = {\n    skipLocationChange: false\n  }): Promise<boolean> {\n    if (typeof ngDevMode === 'undefined' ||\n        ngDevMode && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n      this.console.warn(\n          `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n    }\n\n    const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n    const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n    return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n  }\n\n  /**\n   * Navigate based on the provided array of commands and a starting point.\n   * If no starting route is provided, the navigation is absolute.\n   *\n   * @param commands An array of URL fragments with which to construct the target URL.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\n   * of the options object, if supplied.\n   * @param extras An options object that determines how the URL should be constructed or\n   *     interpreted.\n   *\n   * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\n   *     fails,\n   * or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to a dynamic route path relative to the current URL.\n   *\n   * ```\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n   *\n   * // Navigate without updating the URL, overriding the default behavior\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    validateCommands(commands);\n    return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n  }\n\n  /** Serializes a `UrlTree` into a string */\n  serializeUrl(url: UrlTree): string {\n    return this.urlSerializer.serialize(url);\n  }\n\n  /** Parses a string into a `UrlTree` */\n  parseUrl(url: string): UrlTree {\n    let urlTree: UrlTree;\n    try {\n      urlTree = this.urlSerializer.parse(url);\n    } catch (e) {\n      urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n    }\n    return urlTree;\n  }\n\n  /**\n   * Returns whether the url is activated.\n   *\n   * @deprecated\n   * Use `IsActiveMatchOptions` instead.\n   *\n   * - The equivalent `IsActiveMatchOptions` for `true` is\n   * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.\n   * - The equivalent for `false` is\n   * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.\n   */\n  isActive(url: string|UrlTree, exact: boolean): boolean;\n  /**\n   * Returns whether the url is activated.\n   */\n  isActive(url: string|UrlTree, matchOptions: IsActiveMatchOptions): boolean;\n  /** @internal */\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean;\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean {\n    let options: IsActiveMatchOptions;\n    if (matchOptions === true) {\n      options = {...exactMatchOptions};\n    } else if (matchOptions === false) {\n      options = {...subsetMatchOptions};\n    } else {\n      options = matchOptions;\n    }\n    if (isUrlTree(url)) {\n      return containsTree(this.currentUrlTree, url, options);\n    }\n\n    const urlTree = this.parseUrl(url);\n    return containsTree(this.currentUrlTree, urlTree, options);\n  }\n\n  private removeEmptyProps(params: Params): Params {\n    return Object.keys(params).reduce((result: Params, key: string) => {\n      const value: any = params[key];\n      if (value !== null && value !== undefined) {\n        result[key] = value;\n      }\n      return result;\n    }, {});\n  }\n\n  private processNavigations(): void {\n    this.navigations.subscribe(\n        t => {\n          this.navigated = true;\n          this.lastSuccessfulId = t.id;\n          this.currentPageId = t.targetPageId;\n          (this.events as Subject<Event>)\n              .next(new NavigationEnd(\n                  t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n          this.lastSuccessfulNavigation = this.currentNavigation;\n          t.resolve(true);\n        },\n        e => {\n          this.console.warn(`Unhandled Navigation Error: ${e}`);\n        });\n  }\n\n  private scheduleNavigation(\n      rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n      extras: NavigationExtras,\n      priorPromise?: {resolve: any, reject: any, promise: Promise<boolean>}): Promise<boolean> {\n    if (this.disposed) {\n      return Promise.resolve(false);\n    }\n\n    // * Imperative navigations (router.navigate) might trigger additional navigations to the same\n    //   URL via a popstate event and the locationChangeListener. We should skip these duplicate\n    //   navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router\n    //   states.\n    // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If\n    //   the user follows that with a navigation using the back/forward button or manual URL change,\n    //   the destination may be the same as the previous imperative attempt. We should not skip\n    //   these navigations because it's a separate case from the one above -- it's not a duplicate\n    //   navigation.\n    const lastNavigation = this.getTransition();\n    // We don't want to skip duplicate successful navs if they're imperative because\n    // onSameUrlNavigation could be 'reload' (so the duplicate is intended).\n    const browserNavPrecededByRouterNav = isBrowserTriggeredNavigation(source) && lastNavigation &&\n        !isBrowserTriggeredNavigation(lastNavigation.source);\n    const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id;\n    // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison.\n    // However, if it failed, we should compare to the final result (urlAfterRedirects).\n    const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ?\n        lastNavigation.rawUrl :\n        lastNavigation.urlAfterRedirects;\n    const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();\n    if (browserNavPrecededByRouterNav && duplicateNav) {\n      return Promise.resolve(true);  // return value is not used\n    }\n\n    let resolve: any;\n    let reject: any;\n    let promise: Promise<boolean>;\n    if (priorPromise) {\n      resolve = priorPromise.resolve;\n      reject = priorPromise.reject;\n      promise = priorPromise.promise;\n\n    } else {\n      promise = new Promise<boolean>((res, rej) => {\n        resolve = res;\n        reject = rej;\n      });\n    }\n\n    const id = ++this.navigationId;\n    let targetPageId: number;\n    if (this.canceledNavigationResolution === 'computed') {\n      const isInitialPage = this.currentPageId === 0;\n      if (isInitialPage) {\n        restoredState = this.location.getState() as RestoredState | null;\n      }\n      // If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of\n      // `ɵrouterPageId`. This is the case for something like a page refresh where we assign the\n      // target id to the previously set value for that page.\n      if (restoredState && restoredState.ɵrouterPageId) {\n        targetPageId = restoredState.ɵrouterPageId;\n      } else {\n        // If we're replacing the URL or doing a silent navigation, we do not want to increment the\n        // page id because we aren't pushing a new entry to history.\n        if (extras.replaceUrl || extras.skipLocationChange) {\n          targetPageId = this.browserPageId ?? 0;\n        } else {\n          targetPageId = (this.browserPageId ?? 0) + 1;\n        }\n      }\n    } else {\n      // This is unused when `canceledNavigationResolution` is not computed.\n      targetPageId = 0;\n    }\n\n    this.setTransition({\n      id,\n      targetPageId,\n      source,\n      restoredState,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.rawUrlTree,\n      rawUrl,\n      extras,\n      resolve,\n      reject,\n      promise,\n      currentSnapshot: this.routerState.snapshot,\n      currentRouterState: this.routerState\n    });\n\n    // Make sure that the error is propagated even though `processNavigations` catch\n    // handler does not rethrow\n    return promise.catch((e: any) => {\n      return Promise.reject(e);\n    });\n  }\n\n  private setBrowserUrl(url: UrlTree, t: NavigationTransition) {\n    const path = this.urlSerializer.serialize(url);\n    const state = {...t.extras.state, ...this.generateNgRouterState(t.id, t.targetPageId)};\n    if (this.location.isCurrentPathEqualTo(path) || !!t.extras.replaceUrl) {\n      this.location.replaceState(path, '', state);\n    } else {\n      this.location.go(path, '', state);\n    }\n  }\n\n  /**\n   * Performs the necessary rollback action to restore the browser URL to the\n   * state before the transition.\n   */\n  private restoreHistory(t: NavigationTransition, restoringFromCaughtError = false) {\n    if (this.canceledNavigationResolution === 'computed') {\n      const targetPagePosition = this.currentPageId - t.targetPageId;\n      // The navigator change the location before triggered the browser event,\n      // so we need to go back to the current url if the navigation is canceled.\n      // Also, when navigation gets cancelled while using url update strategy eager, then we need to\n      // go back. Because, when `urlUpdateSrategy` is `eager`; `setBrowserUrl` method is called\n      // before any verification.\n      const browserUrlUpdateOccurred =\n          (t.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n           this.currentUrlTree === this.currentNavigation?.finalUrl);\n      if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n        this.location.historyGo(targetPagePosition);\n      } else if (\n          this.currentUrlTree === this.currentNavigation?.finalUrl && targetPagePosition === 0) {\n        // We got to the activation stage (where currentUrlTree is set to the navigation's\n        // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n        // We still need to reset the router state back to what it was when the navigation started.\n        this.resetState(t);\n        // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.\n        // Investigate if this can be done by running TGP.\n        this.browserUrlTree = t.currentUrlTree;\n        this.resetUrlToCurrentUrlTree();\n      } else {\n        // The browser URL and router state was not updated before the navigation cancelled so\n        // there's no restoration needed.\n      }\n    } else if (this.canceledNavigationResolution === 'replace') {\n      // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n      // for `deferred` navigations that haven't change the internal state yet because guards\n      // reject. For 'eager' navigations, it seems like we also really should reset the state\n      // because the navigation was cancelled. Investigate if this can be done by running TGP.\n      if (restoringFromCaughtError) {\n        this.resetState(t);\n      }\n      this.resetUrlToCurrentUrlTree();\n    }\n  }\n\n  private resetState(t: NavigationTransition): void {\n    (this as {routerState: RouterState}).routerState = t.currentRouterState;\n    this.currentUrlTree = t.currentUrlTree;\n    this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n  }\n\n  private resetUrlToCurrentUrlTree(): void {\n    this.location.replaceState(\n        this.urlSerializer.serialize(this.rawUrlTree), '',\n        this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n  }\n\n  private cancelNavigationTransition(t: NavigationTransition, reason: string) {\n    const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), reason);\n    this.triggerEvent(navCancel);\n    t.resolve(false);\n  }\n\n  private generateNgRouterState(navigationId: number, routerPageId?: number) {\n    if (this.canceledNavigationResolution === 'computed') {\n      return {navigationId, ɵrouterPageId: routerPageId};\n    }\n    return {navigationId};\n  }\n}\n\nfunction validateCommands(commands: string[]): void {\n  for (let i = 0; i < commands.length; i++) {\n    const cmd = commands[i];\n    if (cmd == null) {\n      throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n    }\n  }\n}\n\nfunction isBrowserTriggeredNavigation(source: 'imperative'|'popstate'|'hashchange') {\n  return source !== 'imperative';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {Params} from '../shared';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segements.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink implements OnChanges {\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private preserve!: boolean;\n\n  /** @internal */\n  onChanges = new Subject<RouterLink>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n    if (tabIndex == null) {\n      renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges) {\n    // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n    // to the RouterLinks it's tracking.\n    this.onChanges.next(this);\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  @HostListener('click')\n  onClick(): boolean {\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state,\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return true;\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @HostBinding('attr.target') @Input() target!: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private subscription: Subscription;\n  // TODO(issue/24571): remove '!'.\n  private preserve!: boolean;\n\n  // the url displayed on the anchor element.\n  // TODO(issue/24571): remove '!'.\n  @HostBinding() href!: string;\n\n  /** @internal */\n  onChanges = new Subject<RouterLinkWithHref>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      private locationStrategy: LocationStrategy) {\n    this.subscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.updateTargetUrlAndHref();\n      }\n    });\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): any {\n    this.updateTargetUrlAndHref();\n    this.onChanges.next(this);\n  }\n  /** @nodoc */\n  ngOnDestroy(): any {\n    this.subscription.unsubscribe();\n  }\n\n  /** @nodoc */\n  @HostListener(\n      'click',\n      ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'])\n  onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean):\n      boolean {\n    if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n      return true;\n    }\n\n    if (typeof this.target === 'string' && this.target != '_self') {\n      return true;\n    }\n\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return false;\n  }\n\n  private updateTargetUrlAndHref(): void {\n    this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\nfunction attrBoolValue(s: any): boolean {\n  return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, Optional, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {from, of, Subscription} from 'rxjs';\nimport {mergeAll} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {IsActiveMatchOptions} from '../url_tree';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLinkActive]',\n  exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n  @ContentChildren(RouterLink, {descendants: true}) links!: QueryList<RouterLink>;\n  @ContentChildren(RouterLinkWithHref, {descendants: true})\n  linksWithHrefs!: QueryList<RouterLinkWithHref>;\n\n  private classes: string[] = [];\n  private routerEventsSubscription: Subscription;\n  private linkInputChangesSubscription?: Subscription;\n  public readonly isActive: boolean = false;\n\n  /**\n   * Options to configure how to determine if the router link is active.\n   *\n   * These options are passed to the `Router.isActive()` function.\n   *\n   * @see Router.isActive\n   */\n  @Input() routerLinkActiveOptions: {exact: boolean}|IsActiveMatchOptions = {exact: false};\n\n\n  constructor(\n      private router: Router, private element: ElementRef, private renderer: Renderer2,\n      private readonly cdr: ChangeDetectorRef, @Optional() private link?: RouterLink,\n      @Optional() private linkWithHref?: RouterLinkWithHref) {\n    this.routerEventsSubscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.update();\n      }\n    });\n  }\n\n  /** @nodoc */\n  ngAfterContentInit(): void {\n    // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n    of(this.links.changes, this.linksWithHrefs.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n      this.update();\n      this.subscribeToEachLinkOnChanges();\n    });\n  }\n\n  private subscribeToEachLinkOnChanges() {\n    this.linkInputChangesSubscription?.unsubscribe();\n    const allLinkChanges =\n        [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref]\n            .filter((link): link is RouterLink|RouterLinkWithHref => !!link)\n            .map(link => link.onChanges);\n    this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n      if (this.isActive !== this.isLinkActive(this.router)(link)) {\n        this.update();\n      }\n    });\n  }\n\n  @Input()\n  set routerLinkActive(data: string[]|string) {\n    const classes = Array.isArray(data) ? data : data.split(' ');\n    this.classes = classes.filter(c => !!c);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    this.update();\n  }\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.routerEventsSubscription.unsubscribe();\n    this.linkInputChangesSubscription?.unsubscribe();\n  }\n\n  private update(): void {\n    if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n    Promise.resolve().then(() => {\n      const hasActiveLinks = this.hasActiveLinks();\n      if (this.isActive !== hasActiveLinks) {\n        (this as any).isActive = hasActiveLinks;\n        this.cdr.markForCheck();\n        this.classes.forEach((c) => {\n          if (hasActiveLinks) {\n            this.renderer.addClass(this.element.nativeElement, c);\n          } else {\n            this.renderer.removeClass(this.element.nativeElement, c);\n          }\n        });\n      }\n    });\n  }\n\n  private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n    const options: boolean|IsActiveMatchOptions =\n        isActiveMatchOptions(this.routerLinkActiveOptions) ?\n        this.routerLinkActiveOptions :\n        // While the types should disallow `undefined` here, it's possible without strict inputs\n        (this.routerLinkActiveOptions.exact || false);\n    return (link: RouterLink|RouterLinkWithHref) => router.isActive(link.urlTree, options);\n  }\n\n  private hasActiveLinks(): boolean {\n    const isActiveCheckFn = this.isLinkActive(this.router);\n    return this.link && isActiveCheckFn(this.link) ||\n        this.linkWithHref && isActiveCheckFn(this.linkWithHref) ||\n        this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);\n  }\n}\n\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options: {exact: boolean}|\n                              IsActiveMatchOptions): options is IsActiveMatchOptions {\n  return !!(options as IsActiveMatchOptions).paths;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef,} from '@angular/core';\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * An interface that defines the contract for developing a component outlet for the `Router`.\n *\n * An outlet acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * A router outlet should register itself with the `Router` via\n * `ChildrenOutletContexts#onChildOutletCreated` and unregister with\n * `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,\n * it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.\n *\n * @see `ChildrenOutletContexts`\n * @publicApi\n */\nexport interface RouterOutletContract {\n  /**\n   * Whether the given outlet is activated.\n   *\n   * An outlet is considered \"activated\" if it has an active component.\n   */\n  isActivated: boolean;\n\n  /** The instance of the activated component or `null` if the outlet is not activated. */\n  component: Object|null;\n\n  /**\n   * The `Data` of the `ActivatedRoute` snapshot.\n   */\n  activatedRouteData: Data;\n\n  /**\n   * The `ActivatedRoute` for the outlet or `null` if the outlet is not activated.\n   */\n  activatedRoute: ActivatedRoute|null;\n\n  /**\n   * Called by the `Router` when the outlet should activate (create a component).\n   */\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null): void;\n\n  /**\n   * A request to destroy the currently activated component.\n   *\n   * When a `RouteReuseStrategy` indicates that an `ActivatedRoute` should be removed but stored for\n   * later re-use rather than destroyed, the `Router` will call `detach` instead.\n   */\n  deactivate(): void;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree.\n   *\n   * This is similar to `deactivate`, but the activated component should _not_ be destroyed.\n   * Instead, it is returned so that it can be reattached later via the `attach` method.\n   */\n  detach(): ComponentRef<unknown>;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree.\n   */\n  attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;\n\n  /**\n   * Emits an activate event when a new component is instantiated\n   **/\n  activateEvents?: EventEmitter<unknown>;\n\n  /**\n   * Emits a deactivate event when a component is destroyed.\n   */\n  deactivateEvents?: EventEmitter<unknown>;\n}\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {\n  private activated: ComponentRef<any>|null = null;\n  private _activatedRoute: ActivatedRoute|null = null;\n  private name: string;\n\n  @Output('activate') activateEvents = new EventEmitter<any>();\n  @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n  constructor(\n      private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n      private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n      private changeDetector: ChangeDetectorRef) {\n    this.name = name || PRIMARY_OUTLET;\n    parentContexts.onChildOutletCreated(this.name, this);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.parentContexts.onChildOutletDestroyed(this.name);\n  }\n\n  /** @nodoc */\n  ngOnInit(): void {\n    if (!this.activated) {\n      // If the outlet was not instantiated at the time the route got activated we need to populate\n      // the outlet when it is initialized (ie inside a NgIf)\n      const context = this.parentContexts.getContext(this.name);\n      if (context && context.route) {\n        if (context.attachRef) {\n          // `attachRef` is populated when there is an existing component to mount\n          this.attach(context.attachRef, context.route);\n        } else {\n          // otherwise the component defined in the configuration is created\n          this.activateWith(context.route, context.resolver || null);\n        }\n      }\n    }\n  }\n\n  get isActivated(): boolean {\n    return !!this.activated;\n  }\n\n  /**\n   * @returns The currently activated component instance.\n   * @throws An error if the outlet is not activated.\n   */\n  get component(): Object {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this.activated.instance;\n  }\n\n  get activatedRoute(): ActivatedRoute {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this._activatedRoute as ActivatedRoute;\n  }\n\n  get activatedRouteData(): Data {\n    if (this._activatedRoute) {\n      return this._activatedRoute.snapshot.data;\n    }\n    return {};\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree\n   */\n  detach(): ComponentRef<any> {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    this.location.detach();\n    const cmp = this.activated;\n    this.activated = null;\n    this._activatedRoute = null;\n    return cmp;\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n   */\n  attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n    this.activated = ref;\n    this._activatedRoute = activatedRoute;\n    this.location.insert(ref.hostView);\n  }\n\n  deactivate(): void {\n    if (this.activated) {\n      const c = this.component;\n      this.activated.destroy();\n      this.activated = null;\n      this._activatedRoute = null;\n      this.deactivateEvents.emit(c);\n    }\n  }\n\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n    if (this.isActivated) {\n      throw new Error('Cannot activate an already activated outlet');\n    }\n    this._activatedRoute = activatedRoute;\n    const snapshot = activatedRoute._futureSnapshot;\n    const component = <any>snapshot.routeConfig!.component;\n    resolver = resolver || this.resolver;\n    const factory = resolver.resolveComponentFactory(component);\n    const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n    const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n    this.activated = this.location.createComponent(factory, this.location.length, injector);\n    // Calling `markForCheck` to make sure we will run the change detection when the\n    // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n    this.changeDetector.markForCheck();\n    this.activateEvents.emit(this.activated.instance);\n  }\n}\n\nclass OutletInjector implements Injector {\n  constructor(\n      private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n      private parent: Injector) {}\n\n  get(token: any, notFoundValue?: any): any {\n    if (token === ActivatedRoute) {\n      return this.route;\n    }\n\n    if (token === ChildrenOutletContexts) {\n      return this.childContexts;\n    }\n\n    return this.parent.get(token, notFoundValue);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {from, Observable, of, Subscription} from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n  abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return fn().pipe(catchError(() => of(null)));\n  }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return of(null);\n  }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n  private loader: RouterConfigLoader;\n  private subscription?: Subscription;\n\n  constructor(\n      private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n      private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n    const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n    const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n  }\n\n  setUpPreloading(): void {\n    this.subscription =\n        this.router.events\n            .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n            .subscribe(() => {});\n  }\n\n  preload(): Observable<any> {\n    const ngModule = this.injector.get(NgModuleRef);\n    return this.processRoutes(ngModule, this.router.config);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this.subscription) {\n      this.subscription.unsubscribe();\n    }\n  }\n\n  private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n    const res: Observable<any>[] = [];\n    for (const route of routes) {\n      // we already have the config loaded, just recurse\n      if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n        const childConfig = route._loadedConfig;\n        res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n        // no config loaded, fetch the config\n      } else if (route.loadChildren && !route.canLoad) {\n        res.push(this.preloadConfig(ngModule, route));\n\n        // recurse into children\n      } else if (route.children) {\n        res.push(this.processRoutes(ngModule, route.children));\n      }\n    }\n    return from(res).pipe(mergeAll(), map((_) => void 0));\n  }\n\n  private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n    return this.preloadingStrategy.preload(route, () => {\n      const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                            this.loader.load(ngModule.injector, route);\n      return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n        route._loadedConfig = config;\n        return this.processRoutes(config.module, config.routes);\n      }));\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {Injectable, OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\n@Injectable()\nexport class RouterScroller implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  private routerEventsSubscription!: Unsubscribable;\n  // TODO(issue/24571): remove '!'.\n  private scrollEventsSubscription!: Unsubscribable;\n\n  private lastId = 0;\n  private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n  private restoredId = 0;\n  private store: {[key: string]: [number, number]} = {};\n\n  constructor(\n      private router: Router,\n      /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n        scrollPositionRestoration?: 'disabled'|'enabled'|'top',\n        anchorScrolling?: 'disabled'|'enabled'\n      } = {}) {\n    // Default both options to 'disabled'\n    options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n    options.anchorScrolling = options.anchorScrolling || 'disabled';\n  }\n\n  init(): void {\n    // we want to disable the automatic scrolling because having two places\n    // responsible for scrolling results race conditions, especially given\n    // that browser don't implement this behavior consistently\n    if (this.options.scrollPositionRestoration !== 'disabled') {\n      this.viewportScroller.setHistoryScrollRestoration('manual');\n    }\n    this.routerEventsSubscription = this.createScrollEvents();\n    this.scrollEventsSubscription = this.consumeScrollEvents();\n  }\n\n  private createScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (e instanceof NavigationStart) {\n        // store the scroll position of the current stable navigations.\n        this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n        this.lastSource = e.navigationTrigger;\n        this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n      } else if (e instanceof NavigationEnd) {\n        this.lastId = e.id;\n        this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n      }\n    });\n  }\n\n  private consumeScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (!(e instanceof Scroll)) return;\n      // a popstate event. The pop state event will always ignore anchor scrolling.\n      if (e.position) {\n        if (this.options.scrollPositionRestoration === 'top') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        } else if (this.options.scrollPositionRestoration === 'enabled') {\n          this.viewportScroller.scrollToPosition(e.position);\n        }\n        // imperative navigation \"forward\"\n      } else {\n        if (e.anchor && this.options.anchorScrolling === 'enabled') {\n          this.viewportScroller.scrollToAnchor(e.anchor);\n        } else if (this.options.scrollPositionRestoration !== 'disabled') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        }\n      }\n    });\n  }\n\n  private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n    this.router.triggerEvent(new Scroll(\n        routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n  }\n\n  /** @nodoc */\n  ngOnDestroy() {\n    if (this.routerEventsSubscription) {\n      this.routerEventsSubscription.unsubscribe();\n    }\n    if (this.scrollEventsSubscription) {\n      this.scrollEventsSubscription.unsubscribe();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, Location, LOCATION_INITIALIZED, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, OnDestroy, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {of, Subject} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {Event} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES =\n    [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n  Location,\n  {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n  {\n    provide: Router,\n    useFactory: setupRouter,\n    deps: [\n      UrlSerializer, ChildrenOutletContexts, Location, Injector, NgModuleFactoryLoader, Compiler,\n      ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n      [RouteReuseStrategy, new Optional()]\n    ]\n  },\n  ChildrenOutletContexts,\n  {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n  {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n  RouterPreloader,\n  NoPreloading,\n  PreloadAllModules,\n  {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n  return new NgProbeToken('Router', Router);\n}\n\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/router) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\n@NgModule({\n  declarations: ROUTER_DIRECTIVES,\n  exports: ROUTER_DIRECTIVES,\n  entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n  // Note: We are injecting the Router so it gets created eagerly...\n  constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n  /**\n   * Creates and configures a module with all the router providers and directives.\n   * Optionally sets up an application listener to perform an initial navigation.\n   *\n   * When registering the NgModule at the root, import as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forRoot(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the application.\n   * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n   * @return The new `NgModule`.\n   *\n   */\n  static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [\n        ROUTER_PROVIDERS,\n        provideRoutes(routes),\n        {\n          provide: ROUTER_FORROOT_GUARD,\n          useFactory: provideForRootGuard,\n          deps: [[Router, new Optional(), new SkipSelf()]]\n        },\n        {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n        {\n          provide: LocationStrategy,\n          useFactory: provideLocationStrategy,\n          deps:\n              [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]\n        },\n        {\n          provide: RouterScroller,\n          useFactory: createRouterScroller,\n          deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n        },\n        {\n          provide: PreloadingStrategy,\n          useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n                                                             NoPreloading\n        },\n        {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n        provideRouterInitializer(),\n      ],\n    };\n  }\n\n  /**\n   * Creates a module with all the router directives and a provider registering routes,\n   * without creating a new Router service.\n   * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forChild(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n   * @return The new NgModule.\n   *\n   */\n  static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n    return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n  }\n}\n\nexport function createRouterScroller(\n    router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n  if (config.scrollOffset) {\n    viewportScroller.setOffset(config.scrollOffset);\n  }\n  return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n    platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n  return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n                           new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n  if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n    throw new Error(\n        `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n  }\n  return 'guarded';\n}\n\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n *   imports: [RouterModule.forChild(ROUTES)],\n *   providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n  return [\n    {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n    {provide: ROUTES, multi: true, useValue: routes},\n  ];\n}\n\n/**\n * Allowed values in an `ExtraOptions` object that configure\n * when the router performs the initial navigation operation.\n *\n * * 'enabledNonBlocking' - (default) The initial navigation starts after the\n * root component has been created. The bootstrap is not blocked on the completion of the initial\n * navigation.\n * * 'enabledBlocking' - The initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete. This value is required\n * for [server-side rendering](guide/universal) to work.\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\n * the root component gets created. Use if there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic.\n *\n * The following values have been [deprecated](guide/releases#deprecation-practices) since v11,\n * and should not be used for new applications.\n *\n * * 'enabled' - This option is 1:1 replaceable with `enabledBlocking`.\n *\n * @see `forRoot()`\n *\n * @publicApi\n */\nexport type InitialNavigation = 'disabled'|'enabled'|'enabledBlocking'|'enabledNonBlocking';\n\n/**\n * A set of configuration options for a router module, provided in the\n * `forRoot()` method.\n *\n * @see `forRoot()`\n *\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n  /**\n   * When true, log all internal navigation events to the console.\n   * Use for debugging.\n   */\n  enableTracing?: boolean;\n\n  /**\n   * When true, enable the location strategy that uses the URL fragment\n   * instead of the history API.\n   */\n  useHash?: boolean;\n\n  /**\n   * One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.\n   * When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root\n   * component is created. The bootstrap is blocked until the initial navigation is complete. This\n   * value is required for [server-side rendering](guide/universal) to work. When set to\n   * `enabledNonBlocking`, the initial navigation starts after the root component has been created.\n   * The bootstrap is not blocked on the completion of the initial navigation. When set to\n   * `disabled`, the initial navigation is not performed. The location listener is set up before the\n   * root component gets created. Use if there is a reason to have more control over when the router\n   * starts its initial navigation due to some complex initialization logic.\n   */\n  initialNavigation?: InitialNavigation;\n\n  /**\n   * A custom error handler for failed navigations.\n   * If the handler returns a value, the navigation Promise is resolved with this value.\n   * If the handler throws an exception, the navigation Promise is rejected with the exception.\n   *\n   */\n  errorHandler?: ErrorHandler;\n\n  /**\n   * Configures a preloading strategy.\n   * One of `PreloadAllModules` or `NoPreloading` (the default).\n   */\n  preloadingStrategy?: any;\n\n  /**\n   * Define what the router should do if it receives a navigation request to the current URL.\n   * Default is `ignore`, which causes the router ignores the navigation.\n   * This can disable features such as a \"refresh\" button.\n   * Use this option to configure the behavior when navigating to the\n   * current URL. Default is 'ignore'.\n   */\n  onSameUrlNavigation?: 'reload'|'ignore';\n\n  /**\n   * Configures if the scroll position needs to be restored when navigating back.\n   *\n   * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\n   * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\n   * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\n   * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\n   * navigation). This option will be the default in the future.\n   *\n   * You can implement custom scroll restoration behavior by adapting the enabled behavior as\n   * in the following example.\n   *\n   * ```typescript\n   * class AppModule {\n   *   constructor(router: Router, viewportScroller: ViewportScroller) {\n   *     router.events.pipe(\n   *       filter((e: Event): e is Scroll => e instanceof Scroll)\n   *     ).subscribe(e => {\n   *       if (e.position) {\n   *         // backward navigation\n   *         viewportScroller.scrollToPosition(e.position);\n   *       } else if (e.anchor) {\n   *         // anchor navigation\n   *         viewportScroller.scrollToAnchor(e.anchor);\n   *       } else {\n   *         // forward navigation\n   *         viewportScroller.scrollToPosition([0, 0]);\n   *       }\n   *     });\n   *   }\n   * }\n   * ```\n   */\n  scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n  /**\n   * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\n   * Anchor scrolling is disabled by default.\n   *\n   * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n   * that we stored or scroll to the top.\n   */\n  anchorScrolling?: 'disabled'|'enabled';\n\n  /**\n   * Configures the scroll offset the router will use when scrolling to an element.\n   *\n   * When given a tuple with x and y position value,\n   * the router uses that offset each time it scrolls.\n   * When given a function, the router invokes the function every time\n   * it restores scroll position.\n   */\n  scrollOffset?: [number, number]|(() => [number, number]);\n\n  /**\n   * Defines how the router merges parameters, data, and resolved data from parent to child\n   * routes. By default ('emptyOnly'), inherits parent parameters only for\n   * path-less or component-less routes.\n   *\n   * Set to 'always' to enable unconditional inheritance of parent parameters.\n   *\n   * Note that when dealing with matrix parameters, \"parent\" refers to the parent `Route`\n   * config which does not necessarily mean the \"URL segment to the left\". When the `Route` `path`\n   * contains multiple segments, the matrix parameters must appear on the last segment. For example,\n   * matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not\n   * `a;foo=bar/b`.\n   *\n   */\n  paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n  /**\n   * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\n   * invalid character sequences.\n   * The default implementation is to redirect to the root URL, dropping\n   * any path or parameter information. The function takes three parameters:\n   *\n   * - `'URIError'` - Error thrown when parsing a bad URL.\n   * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n   * - `'url'` -  The malformed URL that caused the URIError\n   * */\n  malformedUriErrorHandler?:\n      (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n  /**\n   * Defines when the router updates the browser URL. By default ('deferred'),\n   * update after successful navigation.\n   * Set to 'eager' if prefer to update the URL at the beginning of navigation.\n   * Updating the URL early allows you to handle a failure of navigation by\n   * showing an error message with the URL that failed.\n   */\n  urlUpdateStrategy?: 'deferred'|'eager';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * Example:\n   *\n   * ```\n   * const routes = [\n   *   {\n   *     path: '',\n   *     component: ContainerComponent,\n   *     children: [\n   *       { path: 'a', component: AComponent },\n   *       { path: 'b', component: BComponent },\n   *     ]\n   *   }\n   * ];\n   * ```\n   *\n   * From the `ContainerComponent`, you should be able to navigate to `AComponent` using\n   * the following `routerLink`, but it will not work if `relativeLinkResolution` is set\n   * to `'legacy'`:\n   *\n   * `<a [routerLink]=\"['./a']\">Link to A</a>`\n   *\n   * However, this will work:\n   *\n   * `<a [routerLink]=\"['../a']\">Link to A</a>`\n   *\n   * In other words, you're required to use `../` rather than `./` when the relative link\n   * resolution is set to `'legacy'`.\n   *\n   * The default in v11 is `corrected`.\n   */\n  relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n    urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n    injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][],\n    opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n    routeReuseStrategy?: RouteReuseStrategy) {\n  const router = new Router(\n      null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n  if (urlHandlingStrategy) {\n    router.urlHandlingStrategy = urlHandlingStrategy;\n  }\n\n  if (routeReuseStrategy) {\n    router.routeReuseStrategy = routeReuseStrategy;\n  }\n\n  assignExtraOptionsToRouter(opts, router);\n\n  if (opts.enableTracing) {\n    router.events.subscribe((e: Event) => {\n      // tslint:disable:no-console\n      console.group?.(`Router Event: ${(<any>e.constructor).name}`);\n      console.log(e.toString());\n      console.log(e);\n      console.groupEnd?.();\n      // tslint:enable:no-console\n    });\n  }\n\n  return router;\n}\n\nexport function assignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void {\n  if (opts.errorHandler) {\n    router.errorHandler = opts.errorHandler;\n  }\n\n  if (opts.malformedUriErrorHandler) {\n    router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n  }\n\n  if (opts.onSameUrlNavigation) {\n    router.onSameUrlNavigation = opts.onSameUrlNavigation;\n  }\n\n  if (opts.paramsInheritanceStrategy) {\n    router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n  }\n\n  if (opts.relativeLinkResolution) {\n    router.relativeLinkResolution = opts.relativeLinkResolution;\n  }\n\n  if (opts.urlUpdateStrategy) {\n    router.urlUpdateStrategy = opts.urlUpdateStrategy;\n  }\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n  return router.routerState.root;\n}\n\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer implements OnDestroy {\n  private initNavigation = false;\n  private destroyed = false;\n  private resultOfPreactivationDone = new Subject<void>();\n\n  constructor(private injector: Injector) {}\n\n  appInitializer(): Promise<any> {\n    const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n    return p.then(() => {\n      // If the injector was destroyed, the DI lookups below will fail.\n      if (this.destroyed) {\n        return Promise.resolve(true);\n      }\n\n      let resolve: Function = null!;\n      const res = new Promise(r => resolve = r);\n      const router = this.injector.get(Router);\n      const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n      if (opts.initialNavigation === 'disabled') {\n        router.setUpLocationChangeListener();\n        resolve(true);\n      } else if (\n          // TODO: enabled is deprecated as of v11, can be removed in v13\n          opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') {\n        router.hooks.afterPreactivation = () => {\n          // only the initial navigation should be delayed\n          if (!this.initNavigation) {\n            this.initNavigation = true;\n            resolve(true);\n            return this.resultOfPreactivationDone;\n\n            // subsequent navigations should not be delayed\n          } else {\n            return of(null) as any;\n          }\n        };\n        router.initialNavigation();\n      } else {\n        resolve(true);\n      }\n\n      return res;\n    });\n  }\n\n  bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n    const opts = this.injector.get(ROUTER_CONFIGURATION);\n    const preloader = this.injector.get(RouterPreloader);\n    const routerScroller = this.injector.get(RouterScroller);\n    const router = this.injector.get(Router);\n    const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n\n    // Default case\n    if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) {\n      router.initialNavigation();\n    }\n\n    preloader.setUpPreloading();\n    routerScroller.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    this.resultOfPreactivationDone.next(null!);\n    this.resultOfPreactivationDone.complete();\n  }\n\n  ngOnDestroy() {\n    this.destroyed = true;\n  }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n  return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n  return r.bootstrapListener.bind(r);\n}\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n    new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer(): ReadonlyArray<Provider> {\n  return [\n    RouterInitializer,\n    {\n      provide: APP_INITIALIZER,\n      multi: true,\n      useFactory: getAppInitializer,\n      deps: [RouterInitializer]\n    },\n    {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n  ];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('12.2.9');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, DeprecatedLoadChildren, LoadChildren, LoadChildrenCallback, QueryParamsHandling, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatcher, UrlMatchResult} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet, RouterOutletContract} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {BaseRouteReuseStrategy, DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationBehaviorOptions, NavigationExtras, Router, UrlCreationOptions} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, InitialNavigation, provideRoutes, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, IsActiveMatchOptions, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {EmptyOutletComponent as ɵangular_packages_router_router_l} from './src/components/empty_outlet';\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_o} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_m,TreeNode as ɵangular_packages_router_router_n} from './src/utils/tree';"],"names":["isObservable","isPromise","from","of","BehaviorSubject","map","switchMap","combineLatest","take","startWith","scan","filter","Component","EmptyOutletComponent","noMatch","Observable","NgModuleRef","catchError","concatMap","last","first","EmptyError","mergeMap","tap","applyRedirects","applyRedirectsFn","concat","defer","NoMatch","recognize","recognizeFn","takeLast","EMPTY","InjectionToken","InjectFlags","ConnectableObservable","Subject","refCount","NgModuleFactory","Console","NgZone","finalize","Injectable","Type","Location","Injector","NgModuleFactoryLoader","Compiler","Directive","Attribute","Renderer2","ElementRef","Input","HostListener","LocationStrategy","HostBinding","mergeAll","ChangeDetectorRef","Optional","ContentChildren","EventEmitter","ViewContainerRef","ComponentFactoryResolver","Output","ViewportScroller","SystemJsNgModuleLoader","NgProbeToken","SkipSelf","PlatformLocation","Inject","APP_BASE_HREF","NgModule","HashLocationStrategy","PathLocationStrategy","ANALYZE_FOR_ENTRY_COMPONENTS","LOCATION_INITIALIZED","ApplicationRef","APP_INITIALIZER","APP_BOOTSTRAP_LISTENER","Version"],"mappings":";;;;;;;;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAA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,EAAE,UAAU,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,iBAAiB,CAAC,EAAC;YAC1F,EAAC,OAAO,EAAEC,2BAAsB,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAC;SAChF,CAAC;IACJ;;ICjmBA;;;;;;;IAgBA;;;QAGa,OAAO,GAAG,IAAIC,YAAO,CAAC,mBAAmB;;ICnBtD;;;;;;;;ICAA;;;;;;;;ICAA;;;;;;;IAeA;;ICfA;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
+{"version":3,"file":"router.umd.js","sources":["../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../packages/router/src/events.ts","../../../../../packages/router/src/shared.ts","../../../../../packages/router/src/utils/collection.ts","../../../../../packages/router/src/url_tree.ts","../../../../../packages/router/src/utils/tree.ts","../../../../../packages/router/src/router_state.ts","../../../../../packages/router/src/create_router_state.ts","../../../../../packages/router/src/create_url_tree.ts","../../../../../packages/router/src/operators/activate_routes.ts","../../../../../packages/router/src/config.ts","../../../../../packages/router/src/utils/type_guards.ts","../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../packages/router/src/components/empty_outlet.ts","../../../../../packages/router/src/utils/config.ts","../../../../../packages/router/src/utils/config_matching.ts","../../../../../packages/router/src/apply_redirects.ts","../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../packages/router/src/utils/preactivation.ts","../../../../../packages/router/src/operators/check_guards.ts","../../../../../packages/router/src/recognize.ts","../../../../../packages/router/src/operators/recognize.ts","../../../../../packages/router/src/operators/resolve_data.ts","../../../../../packages/router/src/operators/switch_tap.ts","../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../packages/router/src/router_config_loader.ts","../../../../../packages/router/src/router_outlet_context.ts","../../../../../packages/router/src/url_handling_strategy.ts","../../../../../packages/router/src/router.ts","../../../../../packages/router/src/directives/router_link.ts","../../../../../packages/router/src/directives/router_link_active.ts","../../../../../packages/router/src/directives/router_outlet.ts","../../../../../packages/router/src/router_preloader.ts","../../../../../packages/router/src/router_scroller.ts","../../../../../packages/router/src/router_module.ts","../../../../../packages/router/src/version.ts","../../../../../packages/router/src/private_export.ts","../../../../../packages/router/src/index.ts","../../../../../packages/router/public_api.ts","../../../../../packages/router/index.ts","../../../../../packages/router/router.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    if (typeof b !== \"function\" && b !== null)\r\n        throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n    if (m) return m.call(o);\r\n    if (o && typeof o.length === \"number\") return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n            r[k] = a[j];\r\n    return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n        if (ar || !(i in from)) {\r\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n            ar[i] = from[i];\r\n        }\r\n    }\r\n    return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n    o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n    __setModuleDefault(result, mod);\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n    if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n    return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * Identifies the call or event that triggered a navigation.\n *\n * * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.\n * * 'popstate' : Triggered by a `popstate` event.\n * * 'hashchange'-: Triggered by a `hashchange` event.\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative'|'popstate'|'hashchange';\n\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n *   constructor(public router: Router) {\n *     router.events.pipe(\n *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n *     ).subscribe((e: RouterEvent) => {\n *       // Do something\n *     });\n *   }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router-reference#router-events)\n * @publicApi\n */\nexport class RouterEvent {\n  constructor(\n      /** A unique ID that the router assigns to every router navigation. */\n      public id: number,\n      /** The URL that is the destination for this navigation. */\n      public url: string) {}\n}\n\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n  /**\n   * Identifies the call or event that triggered the navigation.\n   * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n   *\n   * @see `NavigationEnd`\n   * @see `NavigationCancel`\n   * @see `NavigationError`\n   */\n  navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n  /**\n   * The navigation state that was previously supplied to the `pushState` call,\n   * when the navigation is triggered by a `popstate` event. Otherwise null.\n   *\n   * The state object is defined by `NavigationExtras`, and contains any\n   * developer-defined state value, as well as a unique ID that\n   * the router assigns to every router transition/navigation.\n   *\n   * From the perspective of the router, the router never \"goes back\".\n   * When the user clicks on the back button in the browser,\n   * a new navigation ID is created.\n   *\n   * Use the ID in this previous-state object to differentiate between a newly created\n   * state and one returned to by a `popstate` event, so that you can restore some\n   * remembered state, such as scroll position.\n   *\n   */\n  restoredState?: {[k: string]: any, navigationId: number}|null;\n\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n      /** @docsNotRequired */\n      restoredState: {[k: string]: any, navigationId: number}|null = null) {\n    super(id, url);\n    this.navigationTrigger = navigationTrigger;\n    this.restoredState = restoredState;\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public reason: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationCancel`\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public error: any) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n  }\n}\n\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot,\n      /** @docsNotRequired */\n      public shouldActivate: boolean) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see `ResolveEnd`\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadStart(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadEnd(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see  `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart`\n * @publicApi\n */\nexport class ChildActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nexport class Scroll {\n  constructor(\n      /** @docsNotRequired */\n      readonly routerEvent: NavigationEnd,\n\n      /** @docsNotRequired */\n      readonly position: [number, number]|null,\n\n      /** @docsNotRequired */\n      readonly anchor: string|null) {}\n\n  toString(): string {\n    const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n    return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n  }\n}\n\n/**\n * Router events that allow you to track the lifecycle of the router.\n *\n * The events occur in the following sequence:\n *\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\n * the router [lazy loads](/guide/router#lazy-loading) a route configuration.\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\n * and the routes are recognized.\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\n * phase of routing.\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\n * begins activating a route's children.\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\n * phase of routing successfully.\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\n * phase of routing.\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\n * phase of routing successfully.\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\n * activating a route's children.\n * * [ActivationEnd](api/router/ActivationEnd): When the router finishes activating a route.\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\n * * [NavigationError](api/router/NavigationError): When navigation fails\n * due to an unexpected error.\n * * [Scroll](api/router/Scroll): When the user scrolls.\n *\n * @publicApi\n */\nexport type Event = RouterEvent|RouteConfigLoadStart|RouteConfigLoadEnd|ChildActivationStart|\n    ChildActivationEnd|ActivationStart|ActivationEnd|Scroll;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of matrix and query URL parameters.\n * @see `convertToParamMap()`\n * @see `ParamMap`\n *\n * @publicApi\n */\nexport type Params = {\n  [key: string]: any;\n};\n\n/**\n * A map that provides access to the required and optional parameters\n * specific to a route.\n * The map supports retrieving a single value with `get()`\n * or multiple values with `getAll()`.\n *\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n *\n * @publicApi\n */\nexport interface ParamMap {\n  /**\n   * Reports whether the map contains a given parameter.\n   * @param name The parameter name.\n   * @returns True if the map contains the given parameter, false otherwise.\n   */\n  has(name: string): boolean;\n  /**\n   * Retrieves a single value for a parameter.\n   * @param name The parameter name.\n   * @return The parameter's single value,\n   * or the first value if the parameter has multiple values,\n   * or `null` when there is no such parameter.\n   */\n  get(name: string): string|null;\n  /**\n   * Retrieves multiple values for a parameter.\n   * @param name The parameter name.\n   * @return An array containing one or more values,\n   * or an empty array if there is no such parameter.\n   *\n   */\n  getAll(name: string): string[];\n\n  /** Names of the parameters in the map. */\n  readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n  private params: Params;\n\n  constructor(params: Params) {\n    this.params = params || {};\n  }\n\n  has(name: string): boolean {\n    return Object.prototype.hasOwnProperty.call(this.params, name);\n  }\n\n  get(name: string): string|null {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v[0] : v;\n    }\n\n    return null;\n  }\n\n  getAll(name: string): string[] {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v : [v];\n    }\n\n    return [];\n  }\n\n  get keys(): string[] {\n    return Object.keys(this.params);\n  }\n}\n\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n  return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n  const error = Error('NavigationCancelingError: ' + message);\n  (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n  return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n  return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n    segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n  const parts = route.path!.split('/');\n\n  if (parts.length > segments.length) {\n    // The actual URL is shorter than the config, no match\n    return null;\n  }\n\n  if (route.pathMatch === 'full' &&\n      (segmentGroup.hasChildren() || parts.length < segments.length)) {\n    // The config is longer than the actual URL but we are looking for a full match, return null\n    return null;\n  }\n\n  const posParams: {[key: string]: UrlSegment} = {};\n\n  // Check each config part against the actual URL\n  for (let index = 0; index < parts.length; index++) {\n    const part = parts[index];\n    const segment = segments[index];\n    const isParameter = part.startsWith(':');\n    if (isParameter) {\n      posParams[part.substring(1)] = segment;\n    } else if (part !== segment.path) {\n      // The actual URL part does not match the config, no match\n      return null;\n    }\n  }\n\n  return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {from, Observable, of} from 'rxjs';\n\nimport {Params} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; ++i) {\n    if (!shallowEqual(a[i], b[i])) return false;\n  }\n  return true;\n}\n\nexport function shallowEqual(a: Params, b: Params): boolean {\n  // While `undefined` should never be possible, it would sometimes be the case in IE 11\n  // and pre-chromium Edge. The check below accounts for this edge case.\n  const k1 = a ? Object.keys(a) : undefined;\n  const k2 = b ? Object.keys(b) : undefined;\n  if (!k1 || !k2 || k1.length != k2.length) {\n    return false;\n  }\n  let key: string;\n  for (let i = 0; i < k1.length; i++) {\n    key = k1[i];\n    if (!equalArraysOrString(a[key], b[key])) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Test equality for arrays of strings or a string.\n */\nexport function equalArraysOrString(a: string|string[], b: string|string[]) {\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    const aSorted = [...a].sort();\n    const bSorted = [...b].sort();\n    return aSorted.every((val, index) => bSorted[index] === val);\n  } else {\n    return a === b;\n  }\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n  return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n  return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n  return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n  for (const prop in map) {\n    if (map.hasOwnProperty(prop)) {\n      callback(map[prop], prop);\n    }\n  }\n}\n\nexport function wrapIntoObservable<T>(value: T|Promise<T>|Observable<T>): Observable<T> {\n  if (isObservable(value)) {\n    return value;\n  }\n\n  if (isPromise(value)) {\n    // Use `Promise.resolve()` to wrap promise-like instances.\n    // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n    // change detection.\n    return from(Promise.resolve(value));\n  }\n\n  return of(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalArraysOrString, forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n  return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\n/**\n * A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`\n * for the current router state.\n *\n * @publicApi\n * @see Router.isActive\n */\nexport interface IsActiveMatchOptions {\n  /**\n   * Defines the strategy for comparing the matrix parameters of two `UrlTree`s.\n   *\n   * The matrix parameter matching is dependent on the strategy for matching the\n   * segments. That is, if the `paths` option is set to `'subset'`, only\n   * the matrix parameters of the matching segments will be compared.\n   *\n   * - `'exact'`: Requires that matching segments also have exact matrix parameter\n   * matches.\n   * - `'subset'`: The matching segments in the router's active `UrlTree` may contain\n   * extra matrix parameters, but those that exist in the `UrlTree` in question must match.\n   * - `'ignored'`: When comparing `UrlTree`s, matrix params will be ignored.\n   */\n  matrixParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the query parameters of two `UrlTree`s.\n   *\n   * - `'exact'`: the query parameters must match exactly.\n   * - `'subset'`: the active `UrlTree` may contain extra parameters,\n   * but must match the key and value of any that exist in the `UrlTree` in question.\n   * - `'ignored'`: When comparing `UrlTree`s, query params will be ignored.\n   */\n  queryParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the `UrlSegment`s of the `UrlTree`s.\n   *\n   * - `'exact'`: all segments in each `UrlTree` must match.\n   * - `'subset'`: a `UrlTree` will be determined to be active if it\n   * is a subtree of the active route. That is, the active route may contain extra\n   * segments, but must at least have all the segements of the `UrlTree` in question.\n   */\n  paths: 'exact'|'subset';\n  /**\n   * - 'exact'`: indicates that the `UrlTree` fragments must be equal.\n   * - `'ignored'`: the fragments will not be compared when determining if a\n   * `UrlTree` is active.\n   */\n  fragment: 'exact'|'ignored';\n}\n\ntype ParamMatchOptions = 'exact'|'subset'|'ignored';\n\ntype PathCompareFn =\n    (container: UrlSegmentGroup, containee: UrlSegmentGroup, matrixParams: ParamMatchOptions) =>\n        boolean;\ntype ParamCompareFn = (container: Params, containee: Params) => boolean;\n\nconst pathCompareMap: Record<IsActiveMatchOptions['paths'], PathCompareFn> = {\n  'exact': equalSegmentGroups,\n  'subset': containsSegmentGroup,\n};\nconst paramCompareMap: Record<ParamMatchOptions, ParamCompareFn> = {\n  'exact': equalParams,\n  'subset': containsParams,\n  'ignored': () => true,\n};\n\nexport function containsTree(\n    container: UrlTree, containee: UrlTree, options: IsActiveMatchOptions): boolean {\n  return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) &&\n      paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) &&\n      !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\n\nfunction equalParams(container: Params, containee: Params): boolean {\n  // TODO: This does not handle array params correctly.\n  return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  if (!equalPath(container.segments, containee.segments)) return false;\n  if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n    return false;\n  }\n  if (container.numberOfChildren !== containee.numberOfChildren) return false;\n  for (const c in containee.children) {\n    if (!container.children[c]) return false;\n    if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n      return false;\n  }\n  return true;\n}\n\nfunction containsParams(container: Params, containee: Params): boolean {\n  return Object.keys(containee).length <= Object.keys(container).length &&\n      Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\n\nfunction containsSegmentGroup(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\n\nfunction containsSegmentGroupHelper(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[],\n    matrixParams: ParamMatchOptions): boolean {\n  if (container.segments.length > containeePaths.length) {\n    const current = container.segments.slice(0, containeePaths.length);\n    if (!equalPath(current, containeePaths)) return false;\n    if (containee.hasChildren()) return false;\n    if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n    return true;\n\n  } else if (container.segments.length === containeePaths.length) {\n    if (!equalPath(container.segments, containeePaths)) return false;\n    if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n    for (const c in containee.children) {\n      if (!container.children[c]) return false;\n      if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n        return false;\n      }\n    }\n    return true;\n\n  } else {\n    const current = containeePaths.slice(0, container.segments.length);\n    const next = containeePaths.slice(container.segments.length);\n    if (!equalPath(container.segments, current)) return false;\n    if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n    if (!container.children[PRIMARY_OUTLET]) return false;\n    return containsSegmentGroupHelper(\n        container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n  }\n}\n\nfunction matrixParamsMatch(\n    containerPaths: UrlSegment[], containeePaths: UrlSegment[], options: ParamMatchOptions) {\n  return containeePaths.every((containeeSegment, i) => {\n    return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n  });\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree =\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n *     const f = tree.fragment; // return 'fragment'\n *     const q = tree.queryParams; // returns {debug: 'true'}\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n *     g.children['support'].segments; // return 1 segment 'help'\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The root segment group of the URL tree */\n      public root: UrlSegmentGroup,\n      /** The query params of the URL */\n      public queryParams: Params,\n      /** The fragment of the URL */\n      public fragment: string|null) {}\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return DEFAULT_SERIALIZER.serialize(this);\n  }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n  /** @internal */\n  _sourceSegment?: UrlSegmentGroup;\n  /** @internal */\n  _segmentIndexShift?: number;\n  /** The parent node in the url tree */\n  parent: UrlSegmentGroup|null = null;\n\n  constructor(\n      /** The URL segments of this group. See `UrlSegment` for more information */\n      public segments: UrlSegment[],\n      /** The list of children of this group */\n      public children: {[key: string]: UrlSegmentGroup}) {\n    forEach(children, (v: any, k: any) => v.parent = this);\n  }\n\n  /** Whether the segment has child segments */\n  hasChildren(): boolean {\n    return this.numberOfChildren > 0;\n  }\n\n  /** Number of child segments */\n  get numberOfChildren(): number {\n    return Object.keys(this.children).length;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePaths(this);\n  }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments;\n *     s[0].path; // returns 'team'\n *     s[0].parameters; // returns {id: 33}\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _parameterMap!: ParamMap;\n\n  constructor(\n      /** The path part of a URL segment */\n      public path: string,\n\n      /** The matrix parameters associated with a segment */\n      public parameters: {[name: string]: string}) {}\n\n  get parameterMap() {\n    if (!this._parameterMap) {\n      this._parameterMap = convertToParamMap(this.parameters);\n    }\n    return this._parameterMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePath(this);\n  }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  if (as.length !== bs.length) return false;\n  return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n    segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n  let res: T[] = [];\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet === PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet !== PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n  /** Parse a url into a `UrlTree` */\n  abstract parse(url: string): UrlTree;\n\n  /** Converts a `UrlTree` into a url */\n  abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n  /** Parses a url into a `UrlTree` */\n  parse(url: string): UrlTree {\n    const p = new UrlParser(url);\n    return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n  }\n\n  /** Converts a `UrlTree` into a url */\n  serialize(tree: UrlTree): string {\n    const segment = `/${serializeSegment(tree.root, true)}`;\n    const query = serializeQueryParams(tree.queryParams);\n    const fragment =\n        typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n\n    return `${segment}${query}${fragment}`;\n  }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n  return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n  if (!segment.hasChildren()) {\n    return serializePaths(segment);\n  }\n\n  if (root) {\n    const primary = segment.children[PRIMARY_OUTLET] ?\n        serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n        '';\n    const children: string[] = [];\n\n    forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n      if (k !== PRIMARY_OUTLET) {\n        children.push(`${k}:${serializeSegment(v, false)}`);\n      }\n    });\n\n    return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n  } else {\n    const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n      if (k === PRIMARY_OUTLET) {\n        return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n      }\n\n      return [`${k}:${serializeSegment(v, false)}`];\n    });\n\n    // use no parenthesis if the only child is a primary outlet route\n    if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n      return `${serializePaths(segment)}/${children[0]}`;\n    }\n\n    return `${serializePaths(segment)}/(${children.join('//')})`;\n  }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n  return encodeURIComponent(s)\n      .replace(/%40/g, '@')\n      .replace(/%3A/gi, ':')\n      .replace(/%24/g, '$')\n      .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n  return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n  return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n  return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n  return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n  return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n  return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n  return Object.keys(params)\n      .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n      .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n  const strParams: string[] =\n      Object.keys(params)\n          .map((name) => {\n            const value = params[name];\n            return Array.isArray(value) ?\n                value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n                `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n          })\n          .filter(s => !!s);\n\n  return strParams.length ? `?${strParams.join('&')}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n  const match = str.match(SEGMENT_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n  const match = str.match(QUERY_PARAM_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n  const match = str.match(QUERY_PARAM_VALUE_RE);\n  return match ? match[0] : '';\n}\n\nclass UrlParser {\n  private remaining: string;\n\n  constructor(private url: string) {\n    this.remaining = url;\n  }\n\n  parseRootSegment(): UrlSegmentGroup {\n    this.consumeOptional('/');\n\n    if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n      return new UrlSegmentGroup([], {});\n    }\n\n    // The root segment group never has segments\n    return new UrlSegmentGroup([], this.parseChildren());\n  }\n\n  parseQueryParams(): Params {\n    const params: Params = {};\n    if (this.consumeOptional('?')) {\n      do {\n        this.parseQueryParam(params);\n      } while (this.consumeOptional('&'));\n    }\n    return params;\n  }\n\n  parseFragment(): string|null {\n    return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n  }\n\n  private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n    if (this.remaining === '') {\n      return {};\n    }\n\n    this.consumeOptional('/');\n\n    const segments: UrlSegment[] = [];\n    if (!this.peekStartsWith('(')) {\n      segments.push(this.parseSegment());\n    }\n\n    while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n      this.capture('/');\n      segments.push(this.parseSegment());\n    }\n\n    let children: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('/(')) {\n      this.capture('/');\n      children = this.parseParens(true);\n    }\n\n    let res: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('(')) {\n      res = this.parseParens(false);\n    }\n\n    if (segments.length > 0 || Object.keys(children).length > 0) {\n      res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n    }\n\n    return res;\n  }\n\n  // parse a segment with its matrix parameters\n  // ie `name;k1=v1;k2`\n  private parseSegment(): UrlSegment {\n    const path = matchSegments(this.remaining);\n    if (path === '' && this.peekStartsWith(';')) {\n      throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n    }\n\n    this.capture(path);\n    return new UrlSegment(decode(path), this.parseMatrixParams());\n  }\n\n  private parseMatrixParams(): {[key: string]: string} {\n    const params: {[key: string]: string} = {};\n    while (this.consumeOptional(';')) {\n      this.parseParam(params);\n    }\n    return params;\n  }\n\n  private parseParam(params: {[key: string]: string}): void {\n    const key = matchSegments(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchSegments(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    params[decode(key)] = decode(value);\n  }\n\n  // Parse a single query parameter `name[=value]`\n  private parseQueryParam(params: Params): void {\n    const key = matchQueryParams(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchUrlQueryParamValue(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    const decodedKey = decodeQuery(key);\n    const decodedVal = decodeQuery(value);\n\n    if (params.hasOwnProperty(decodedKey)) {\n      // Append to existing values\n      let currentVal = params[decodedKey];\n      if (!Array.isArray(currentVal)) {\n        currentVal = [currentVal];\n        params[decodedKey] = currentVal;\n      }\n      currentVal.push(decodedVal);\n    } else {\n      // Create a new value\n      params[decodedKey] = decodedVal;\n    }\n  }\n\n  // parse `(a/b//outlet_name:c/d)`\n  private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n    const segments: {[key: string]: UrlSegmentGroup} = {};\n    this.capture('(');\n\n    while (!this.consumeOptional(')') && this.remaining.length > 0) {\n      const path = matchSegments(this.remaining);\n\n      const next = this.remaining[path.length];\n\n      // if is is not one of these characters, then the segment was unescaped\n      // or the group was not closed\n      if (next !== '/' && next !== ')' && next !== ';') {\n        throw new Error(`Cannot parse url '${this.url}'`);\n      }\n\n      let outletName: string = undefined!;\n      if (path.indexOf(':') > -1) {\n        outletName = path.substr(0, path.indexOf(':'));\n        this.capture(outletName);\n        this.capture(':');\n      } else if (allowPrimary) {\n        outletName = PRIMARY_OUTLET;\n      }\n\n      const children = this.parseChildren();\n      segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n                                                                  new UrlSegmentGroup([], children);\n      this.consumeOptional('//');\n    }\n\n    return segments;\n  }\n\n  private peekStartsWith(str: string): boolean {\n    return this.remaining.startsWith(str);\n  }\n\n  // Consumes the prefix when it is present and returns whether it has been consumed\n  private consumeOptional(str: string): boolean {\n    if (this.peekStartsWith(str)) {\n      this.remaining = this.remaining.substring(str.length);\n      return true;\n    }\n    return false;\n  }\n\n  private capture(str: string): void {\n    if (!this.consumeOptional(str)) {\n      throw new Error(`Expected \"${str}\".`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n  /** @internal */\n  _root: TreeNode<T>;\n\n  constructor(root: TreeNode<T>) {\n    this._root = root;\n  }\n\n  get root(): T {\n    return this._root.value;\n  }\n\n  /**\n   * @internal\n   */\n  parent(t: T): T|null {\n    const p = this.pathFromRoot(t);\n    return p.length > 1 ? p[p.length - 2] : null;\n  }\n\n  /**\n   * @internal\n   */\n  children(t: T): T[] {\n    const n = findNode(t, this._root);\n    return n ? n.children.map(t => t.value) : [];\n  }\n\n  /**\n   * @internal\n   */\n  firstChild(t: T): T|null {\n    const n = findNode(t, this._root);\n    return n && n.children.length > 0 ? n.children[0].value : null;\n  }\n\n  /**\n   * @internal\n   */\n  siblings(t: T): T[] {\n    const p = findPath(t, this._root);\n    if (p.length < 2) return [];\n\n    const c = p[p.length - 2].children.map(c => c.value);\n    return c.filter(cc => cc !== t);\n  }\n\n  /**\n   * @internal\n   */\n  pathFromRoot(t: T): T[] {\n    return findPath(t, this._root).map(s => s.value);\n  }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n  if (value === node.value) return node;\n\n  for (const child of node.children) {\n    const node = findNode(value, child);\n    if (node) return node;\n  }\n\n  return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n  if (value === node.value) return [node];\n\n  for (const child of node.children) {\n    const path = findPath(value, child);\n    if (path.length) {\n      path.unshift(node);\n      return path;\n    }\n  }\n\n  return [];\n}\n\nexport class TreeNode<T> {\n  constructor(public value: T, public children: TreeNode<T>[]) {}\n\n  toString(): string {\n    return `TreeNode(${this.value})`;\n  }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends {outlet: string}>(node: TreeNode<T>|null) {\n  const map: {[outlet: string]: TreeNode<T>} = {};\n\n  if (node) {\n    node.children.forEach(child => map[child.value.outlet] = child);\n  }\n\n  return map;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalSegments, UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const root: ActivatedRoute = state.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n  /** @internal */\n  constructor(\n      root: TreeNode<ActivatedRoute>,\n      /** The current snapshot of the router state */\n      public snapshot: RouterStateSnapshot) {\n    super(root);\n    setRouterState(<RouterState>this, root);\n  }\n\n  override toString(): string {\n    return this.snapshot.toString();\n  }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>|null): RouterState {\n  const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n  const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n  const emptyParams = new BehaviorSubject({});\n  const emptyData = new BehaviorSubject({});\n  const emptyQueryParams = new BehaviorSubject({});\n  const fragment = new BehaviorSubject('');\n  const activated = new ActivatedRoute(\n      emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n      snapshot.root);\n  activated.snapshot = snapshot.root;\n  return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n    urlTree: UrlTree, rootComponent: Type<any>|null): RouterStateSnapshot {\n  const emptyParams = {};\n  const emptyData = {};\n  const emptyQueryParams = {};\n  const fragment = '';\n  const activated = new ActivatedRouteSnapshot(\n      [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n      urlTree.root, -1, {});\n  return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n *     header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n  /** The current snapshot of this route */\n  snapshot!: ActivatedRouteSnapshot;\n  /** @internal */\n  _futureSnapshot: ActivatedRouteSnapshot;\n  /** @internal */\n  _routerState!: RouterState;\n  /** @internal */\n  _paramMap!: Observable<ParamMap>;\n  /** @internal */\n  _queryParamMap!: Observable<ParamMap>;\n\n  /** @internal */\n  constructor(\n      /** An observable of the URL segments matched by this route. */\n      public url: Observable<UrlSegment[]>,\n      /** An observable of the matrix parameters scoped to this route. */\n      public params: Observable<Params>,\n      /** An observable of the query parameters shared by all the routes. */\n      public queryParams: Observable<Params>,\n      /** An observable of the URL fragment shared by all the routes. */\n      public fragment: Observable<string|null>,\n      /** An observable of the static and resolved data of this route. */\n      public data: Observable<Data>,\n      /** The outlet name of the route, a constant. */\n      public outlet: string,\n      /** The component of the route, a constant. */\n      // TODO(vsavkin): remove |string\n      public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n    this._futureSnapshot = futureSnapshot;\n  }\n\n  /** The configuration used to match this route. */\n  get routeConfig(): Route|null {\n    return this._futureSnapshot.routeConfig;\n  }\n\n  /** The root of the router state. */\n  get root(): ActivatedRoute {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree. */\n  get parent(): ActivatedRoute|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree. */\n  get firstChild(): ActivatedRoute|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree. */\n  get children(): ActivatedRoute[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route. */\n  get pathFromRoot(): ActivatedRoute[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  /**\n   * An Observable that contains a map of the required and optional parameters\n   * specific to the route.\n   * The map supports retrieving single and multiple values from the same parameter.\n   */\n  get paramMap(): Observable<ParamMap> {\n    if (!this._paramMap) {\n      this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._paramMap;\n  }\n\n  /**\n   * An Observable that contains a map of the query parameters available to all routes.\n   * The map supports retrieving single and multiple values from the query parameter.\n   */\n  get queryParamMap(): Observable<ParamMap> {\n    if (!this._queryParamMap) {\n      this._queryParamMap =\n          this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n  }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly'|'always';\n\n/** @internal */\nexport type Inherited = {\n  params: Params,\n  data: Data,\n  resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n    route: ActivatedRouteSnapshot,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n  const pathFromRoot = route.pathFromRoot;\n\n  let inheritingStartingFrom = 0;\n  if (paramsInheritanceStrategy !== 'always') {\n    inheritingStartingFrom = pathFromRoot.length - 1;\n\n    while (inheritingStartingFrom >= 1) {\n      const current = pathFromRoot[inheritingStartingFrom];\n      const parent = pathFromRoot[inheritingStartingFrom - 1];\n      // current route is an empty path => inherits its parent's params and data\n      if (current.routeConfig && current.routeConfig.path === '') {\n        inheritingStartingFrom--;\n\n        // parent is componentless => current route should inherit its params and data\n      } else if (!parent.component) {\n        inheritingStartingFrom--;\n\n      } else {\n        break;\n      }\n    }\n  }\n\n  return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n  return pathFromRoot.reduce((res, curr) => {\n    const params = {...res.params, ...curr.params};\n    const data = {...res.data, ...curr.data};\n    const resolve = {...res.resolve, ...curr._resolvedData};\n    return {params, data, resolve};\n  }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n *   constructor(route: ActivatedRoute) {\n *     const id: string = route.snapshot.params.id;\n *     const url: string = route.snapshot.url.join('');\n *     const user = route.snapshot.data.user;\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n  /** The configuration used to match this route **/\n  public readonly routeConfig: Route|null;\n  /** @internal **/\n  _urlSegment: UrlSegmentGroup;\n  /** @internal */\n  _lastPathIndex: number;\n  /** @internal */\n  _resolve: ResolveData;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _resolvedData!: Data;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _routerState!: RouterStateSnapshot;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _paramMap!: ParamMap;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The URL segments matched by this route */\n      public url: UrlSegment[],\n      /**\n       *  The matrix parameters scoped to this route.\n       *\n       *  You can compute all params (or data) in the router state or to get params outside\n       *  of an activated component by traversing the `RouterState` tree as in the following\n       *  example:\n       *  ```\n       *  collectRouteParams(router: Router) {\n       *    let params = {};\n       *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n       *    while (stack.length > 0) {\n       *      const route = stack.pop()!;\n       *      params = {...params, ...route.params};\n       *      stack.push(...route.children);\n       *    }\n       *    return params;\n       *  }\n       *  ```\n       */\n      public params: Params,\n      /** The query parameters shared by all the routes */\n      public queryParams: Params,\n      /** The URL fragment shared by all the routes */\n      public fragment: string|null,\n      /** The static and resolved data of this route */\n      public data: Data,\n      /** The outlet name of the route */\n      public outlet: string,\n      /** The component of the route */\n      public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n      lastPathIndex: number, resolve: ResolveData) {\n    this.routeConfig = routeConfig;\n    this._urlSegment = urlSegment;\n    this._lastPathIndex = lastPathIndex;\n    this._resolve = resolve;\n  }\n\n  /** The root of the router state */\n  get root(): ActivatedRouteSnapshot {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree */\n  get parent(): ActivatedRouteSnapshot|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree */\n  get firstChild(): ActivatedRouteSnapshot|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree */\n  get children(): ActivatedRouteSnapshot[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route */\n  get pathFromRoot(): ActivatedRouteSnapshot[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  get paramMap(): ParamMap {\n    if (!this._paramMap) {\n      this._paramMap = convertToParamMap(this.params);\n    }\n    return this._paramMap;\n  }\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    const url = this.url.map(segment => segment.toString()).join('/');\n    const matched = this.routeConfig ? this.routeConfig.path : '';\n    return `Route(url:'${url}', path:'${matched}')`;\n  }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const snapshot: RouterStateSnapshot = state.snapshot;\n *     const root: ActivatedRouteSnapshot = snapshot.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n  /** @internal */\n  constructor(\n      /** The url from which this snapshot was created */\n      public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n    super(root);\n    setRouterState(<RouterStateSnapshot>this, root);\n  }\n\n  override toString(): string {\n    return serializeNode(this._root);\n  }\n}\n\nfunction setRouterState<U, T extends {_routerState: U}>(state: U, node: TreeNode<T>): void {\n  node.value._routerState = state;\n  node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n  const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n  return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n  if (route.snapshot) {\n    const currentSnapshot = route.snapshot;\n    const nextSnapshot = route._futureSnapshot;\n    route.snapshot = nextSnapshot;\n    if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n      (<any>route.queryParams).next(nextSnapshot.queryParams);\n    }\n    if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n      (<any>route.fragment).next(nextSnapshot.fragment);\n    }\n    if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n      (<any>route.params).next(nextSnapshot.params);\n    }\n    if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n      (<any>route.url).next(nextSnapshot.url);\n    }\n    if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n      (<any>route.data).next(nextSnapshot.data);\n    }\n  } else {\n    route.snapshot = route._futureSnapshot;\n\n    // this is for resolved data\n    (<any>route.data).next(route._futureSnapshot.data);\n  }\n}\n\n\nexport function equalParamsAndUrlSegments(\n    a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n  const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n  const parentsMismatch = !a.parent !== !b.parent;\n\n  return equalUrlParams && !parentsMismatch &&\n      (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent!));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n    routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n    prevState: RouterState): RouterState {\n  const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n  return new RouterState(root, curr);\n}\n\nfunction createNode(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n  // reuse an activated route that is currently displayed on the screen\n  if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n    const value = prevState.value;\n    value._futureSnapshot = curr.value;\n    const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n    return new TreeNode<ActivatedRoute>(value, children);\n  } else {\n    if (routeReuseStrategy.shouldAttach(curr.value)) {\n      // retrieve an activated route that is used to be displayed, but is not currently displayed\n      const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n      if (detachedRouteHandle !== null) {\n        const tree = (detachedRouteHandle as DetachedRouteHandleInternal).route;\n        setFutureSnapshotsOfActivatedRoutes(curr, tree);\n        return tree;\n      }\n    }\n\n    const value = createActivatedRoute(curr.value);\n    const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n    return new TreeNode<ActivatedRoute>(value, children);\n  }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n    curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n  if (curr.value.routeConfig !== result.value.routeConfig) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n  }\n  if (curr.children.length !== result.children.length) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n  }\n  result.value._futureSnapshot = curr.value;\n  for (let i = 0; i < curr.children.length; ++i) {\n    setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n  }\n}\n\nfunction createOrReuseChildren(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState: TreeNode<ActivatedRoute>) {\n  return curr.children.map(child => {\n    for (const p of prevState.children) {\n      if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n        return createNode(routeReuseStrategy, child, p);\n      }\n    }\n    return createNode(routeReuseStrategy, child);\n  });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n  return new ActivatedRoute(\n      new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n      new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n    route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params|null,\n    fragment: string|null): UrlTree {\n  if (commands.length === 0) {\n    return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n  }\n\n  const nav = computeNavigation(commands);\n\n  if (nav.toRoot()) {\n    return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n  }\n\n  const startingPosition = findStartingPosition(nav, urlTree, route);\n\n  const segmentGroup = startingPosition.processChildren ?\n      updateSegmentGroupChildren(\n          startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n      updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n  return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n  return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command: any): command is {outlets: {[key: string]: any}} {\n  return typeof command === 'object' && command != null && command.outlets;\n}\n\nfunction tree(\n    oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n    queryParams: Params|null, fragment: string|null): UrlTree {\n  let qp: any = {};\n  if (queryParams) {\n    forEach(queryParams, (value: any, name: any) => {\n      qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n    });\n  }\n\n  if (urlTree.root === oldSegmentGroup) {\n    return new UrlTree(newSegmentGroup, qp, fragment);\n  }\n\n  return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n    current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n    newSegment: UrlSegmentGroup): UrlSegmentGroup {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n    if (c === oldSegment) {\n      children[outletName] = newSegment;\n    } else {\n      children[outletName] = replaceSegment(c, oldSegment, newSegment);\n    }\n  });\n  return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n  constructor(\n      public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n    if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n      throw new Error('Root segment cannot have matrix parameters');\n    }\n\n    const cmdWithOutlet = commands.find(isCommandWithOutlets);\n    if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n      throw new Error('{outlets:{}} has to be the last command');\n    }\n  }\n\n  public toRoot(): boolean {\n    return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n  }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n  if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n    return new Navigation(true, 0, commands);\n  }\n\n  let numberOfDoubleDots = 0;\n  let isAbsolute = false;\n\n  const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n    if (typeof cmd === 'object' && cmd != null) {\n      if (cmd.outlets) {\n        const outlets: {[k: string]: any} = {};\n        forEach(cmd.outlets, (commands: any, name: string) => {\n          outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n        });\n        return [...res, {outlets}];\n      }\n\n      if (cmd.segmentPath) {\n        return [...res, cmd.segmentPath];\n      }\n    }\n\n    if (!(typeof cmd === 'string')) {\n      return [...res, cmd];\n    }\n\n    if (cmdIdx === 0) {\n      cmd.split('/').forEach((urlPart, partIndex) => {\n        if (partIndex == 0 && urlPart === '.') {\n          // skip './a'\n        } else if (partIndex == 0 && urlPart === '') {  //  '/a'\n          isAbsolute = true;\n        } else if (urlPart === '..') {  //  '../a'\n          numberOfDoubleDots++;\n        } else if (urlPart != '') {\n          res.push(urlPart);\n        }\n      });\n\n      return res;\n    }\n\n    return [...res, cmd];\n  }, []);\n\n  return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n  constructor(\n      public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n  }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n  if (nav.isAbsolute) {\n    return new Position(tree.root, true, 0);\n  }\n\n  if (route.snapshot._lastPathIndex === -1) {\n    const segmentGroup = route.snapshot._urlSegment;\n    // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n    // see issue #26224, #13011, #35687\n    // However, if the ActivatedRoute is the root we should process children like above.\n    const processChildren = segmentGroup === tree.root;\n    return new Position(segmentGroup, processChildren, 0);\n  }\n\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = route.snapshot._lastPathIndex + modifier;\n  return createPositionApplyingDoubleDots(\n      route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n    group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n  let g = group;\n  let ci = index;\n  let dd = numberOfDoubleDots;\n  while (dd > ci) {\n    dd -= ci;\n    g = g.parent!;\n    if (!g) {\n      throw new Error('Invalid number of \\'../\\'');\n    }\n    ci = g.segments.length;\n  }\n  return new Position(g, false, ci - dd);\n}\n\nfunction getOutlets(commands: unknown[]): {[k: string]: unknown[]|string} {\n  if (isCommandWithOutlets(commands[0])) {\n    return commands[0].outlets;\n  }\n\n  return {[PRIMARY_OUTLET]: commands};\n}\n\nfunction updateSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (!segmentGroup) {\n    segmentGroup = new UrlSegmentGroup([], {});\n  }\n  if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n    return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n  }\n\n  const m = prefixedWith(segmentGroup, startIndex, commands);\n  const slicedCommands = commands.slice(m.commandIndex);\n  if (m.match && m.pathIndex < segmentGroup.segments.length) {\n    const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n    g.children[PRIMARY_OUTLET] =\n        new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n    return updateSegmentGroupChildren(g, 0, slicedCommands);\n  } else if (m.match && slicedCommands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else if (m.match && !segmentGroup.hasChildren()) {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  } else if (m.match) {\n    return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n  } else {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  }\n}\n\nfunction updateSegmentGroupChildren(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (commands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else {\n    const outlets = getOutlets(commands);\n    const children: {[key: string]: UrlSegmentGroup} = {};\n\n    forEach(outlets, (commands, outlet) => {\n      if (typeof commands === 'string') {\n        commands = [commands];\n      }\n      if (commands !== null) {\n        children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n      }\n    });\n\n    forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n      if (outlets[childOutlet] === undefined) {\n        children[childOutlet] = child;\n      }\n    });\n    return new UrlSegmentGroup(segmentGroup.segments, children);\n  }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n  let currentCommandIndex = 0;\n  let currentPathIndex = startIndex;\n\n  const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n  while (currentPathIndex < segmentGroup.segments.length) {\n    if (currentCommandIndex >= commands.length) return noMatch;\n    const path = segmentGroup.segments[currentPathIndex];\n    const command = commands[currentCommandIndex];\n    // Do not try to consume command as part of the prefixing if it has outlets because it can\n    // contain outlets other than the one being processed. Consuming the outlets command would\n    // result in other outlets being ignored.\n    if (isCommandWithOutlets(command)) {\n      break;\n    }\n    const curr = `${command}`;\n    const next =\n        currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n    if (currentPathIndex > 0 && curr === undefined) break;\n\n    if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n      if (!compare(curr, next, path)) return noMatch;\n      currentCommandIndex += 2;\n    } else {\n      if (!compare(curr, {}, path)) return noMatch;\n      currentCommandIndex++;\n    }\n    currentPathIndex++;\n  }\n\n  return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  const paths = segmentGroup.segments.slice(0, startIndex);\n\n  let i = 0;\n  while (i < commands.length) {\n    const command = commands[i];\n    if (isCommandWithOutlets(command)) {\n      const children = createNewSegmentChildren(command.outlets);\n      return new UrlSegmentGroup(paths, children);\n    }\n\n    // if we start with an object literal, we need to reuse the path part from the segment\n    if (i === 0 && isMatrixParams(commands[0])) {\n      const p = segmentGroup.segments[startIndex];\n      paths.push(new UrlSegment(p.path, stringify(commands[0])));\n      i++;\n      continue;\n    }\n\n    const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n    const next = (i < commands.length - 1) ? commands[i + 1] : null;\n    if (curr && next && isMatrixParams(next)) {\n      paths.push(new UrlSegment(curr, stringify(next)));\n      i += 2;\n    } else {\n      paths.push(new UrlSegment(curr, {}));\n      i++;\n    }\n  }\n  return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: unknown[]|string}):\n    {[outlet: string]: UrlSegmentGroup} {\n  const children: {[outlet: string]: UrlSegmentGroup} = {};\n  forEach(outlets, (commands, outlet) => {\n    if (typeof commands === 'string') {\n      commands = [commands];\n    }\n    if (commands !== null) {\n      children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n    }\n  });\n  return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n  const res: {[key: string]: string} = {};\n  forEach(params, (v: any, k: string) => res[k] = `${v}`);\n  return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n  return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, advanceActivatedRoute, RouterState} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport const activateRoutes =\n    (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n     forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n        map(t => {\n          new ActivateRoutes(\n              routeReuseStrategy, t.targetRouterState!, t.currentRouterState, forwardEvent)\n              .activate(rootContexts);\n          return t;\n        });\n\nexport class ActivateRoutes {\n  constructor(\n      private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n      private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n  activate(parentContexts: ChildrenOutletContexts): void {\n    const futureRoot = this.futureState._root;\n    const currRoot = this.currState ? this.currState._root : null;\n\n    this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n    advanceActivatedRoute(this.futureState.root);\n    this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n  }\n\n  // De-activate the child route that are not re-used for the future state\n  private deactivateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n    // Recurse on the routes active in the future state to de-activate deeper children\n    futureNode.children.forEach(futureChild => {\n      const childOutletName = futureChild.value.outlet;\n      this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n      delete children[childOutletName];\n    });\n\n    // De-activate the routes that will not be re-used\n    forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n      this.deactivateRouteAndItsChildren(v, contexts);\n    });\n  }\n\n  private deactivateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContext: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    if (future === curr) {\n      // Reusing the node, check to see if the children need to be de-activated\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContext.getContext(future.outlet);\n        if (context) {\n          this.deactivateChildRoutes(futureNode, currNode, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.deactivateChildRoutes(futureNode, currNode, parentContext);\n      }\n    } else {\n      if (curr) {\n        // Deactivate the current route which will not be re-used\n        this.deactivateRouteAndItsChildren(currNode, parentContext);\n      }\n    }\n  }\n\n  private deactivateRouteAndItsChildren(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n      this.detachAndStoreRouteSubtree(route, parentContexts);\n    } else {\n      this.deactivateRouteAndOutlet(route, parentContexts);\n    }\n  }\n\n  private detachAndStoreRouteSubtree(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    if (context && context.outlet) {\n      const componentRef = context.outlet.detach();\n      const contexts = context.children.onOutletDeactivated();\n      this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n    }\n  }\n\n  private deactivateRouteAndOutlet(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    // The context could be `null` if we are on a componentless route but there may still be\n    // children that need deactivating.\n    const contexts = context && route.value.component ? context.children : parentContexts;\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);\n\n    for (const childOutlet of Object.keys(children)) {\n      this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n    }\n\n    if (context && context.outlet) {\n      // Destroy the component\n      context.outlet.deactivate();\n      // Destroy the contexts for all the outlets that were in the component\n      context.children.onOutletDeactivated();\n      // Clear the information about the attached component on the context but keep the reference to\n      // the outlet.\n      context.attachRef = null;\n      context.resolver = null;\n      context.route = null;\n    }\n  }\n\n  private activateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outlet: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n    futureNode.children.forEach(c => {\n      this.activateRoutes(c, children[c.value.outlet], contexts);\n      this.forwardEvent(new ActivationEnd(c.value.snapshot));\n    });\n    if (futureNode.children.length) {\n      this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n    }\n  }\n\n  private activateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContexts: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    advanceActivatedRoute(future);\n\n    // reusing the node\n    if (future === curr) {\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n        this.activateChildRoutes(futureNode, currNode, context.children);\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, currNode, parentContexts);\n      }\n    } else {\n      if (future.component) {\n        // if we have a normal route, we need to place the component into the outlet and recurse.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n\n        if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n          const stored =\n              (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n          this.routeReuseStrategy.store(future.snapshot, null);\n          context.children.onOutletReAttached(stored.contexts);\n          context.attachRef = stored.componentRef;\n          context.route = stored.route.value;\n          if (context.outlet) {\n            // Attach right away when the outlet has already been instantiated\n            // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n            context.outlet.attach(stored.componentRef, stored.route.value);\n          }\n          advanceActivatedRouteNodeAndItsChildren(stored.route);\n        } else {\n          const config = parentLoadedConfig(future.snapshot);\n          const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n          context.attachRef = null;\n          context.route = future;\n          context.resolver = cmpFactoryResolver;\n          if (context.outlet) {\n            // Activate the outlet when it has already been instantiated\n            // Otherwise it will get activated from its `ngOnInit` when instantiated\n            context.outlet.activateWith(future, cmpFactoryResolver);\n          }\n\n          this.activateChildRoutes(futureNode, null, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, null, parentContexts);\n      }\n    }\n  }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n  advanceActivatedRoute(node.value);\n  node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n    if (route && route.component) return null;\n  }\n\n  return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * Represents a route configuration for the Router service.\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\n * in `Route.children`.\n *\n * @see `Route`\n * @see `Router`\n * @see [Router configuration guide](guide/router-reference#configuration)\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * Represents the result of matching URLs with a custom matching function.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @see `UrlMatcher()`\n * @publicApi\n */\nexport type UrlMatchResult = {\n  consumed: UrlSegment[];\n  posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * A function for matching a route against URLs. Implement a custom URL matcher\n * for `Route.matcher` when a combination of `path` and `pathMatch`\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\n *\n * The function takes the following arguments and returns a `UrlMatchResult` object.\n * * *segments* : An array of URL segments.\n * * *group* : A segment group.\n * * *route* : The route to match against.\n *\n * The following example implementation matches HTML files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n    UrlMatchResult|null;\n\n/**\n *\n * Represents static data associated with a particular route.\n *\n * @see `Route#data`\n *\n * @publicApi\n */\nexport type Data = {\n  [name: string]: any\n};\n\n/**\n *\n * Represents the resolved data associated with a particular route.\n *\n * @see `Route#resolve`.\n *\n * @publicApi\n */\nexport type ResolveData = {\n  [name: string]: any\n};\n\n/**\n *\n * A function that is called to resolve a collection of lazy-loaded routes.\n * Must be an arrow function of the following form:\n * `() => import('...').then(mod => mod.MODULE)`\n *\n * For example:\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @see [Route.loadChildren](api/router/Route#loadChildren)\n * @publicApi\n */\nexport type LoadChildrenCallback = () => Type<any>|NgModuleFactory<any>|Observable<Type<any>>|\n    Promise<NgModuleFactory<any>|Type<any>|any>;\n\n/**\n *\n * A function that returns a set of routes to load.\n *\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\n * form (`LoadChildrenCallback`) should be used instead.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n */\nexport type LoadChildren = LoadChildrenCallback|DeprecatedLoadChildren;\n\n/**\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n * @deprecated The `string` form of `loadChildren` is deprecated in favor of the\n * `LoadChildrenCallback` function which uses the ES dynamic `import()` expression.\n * This offers a more natural and standards-based mechanism to dynamically\n * load an ES module at runtime.\n */\nexport type DeprecatedLoadChildren = string;\n\n/**\n *\n * How to handle query parameters in a router link.\n * One of:\n * - `merge` : Merge new with current parameters.\n * - `preserve` : Preserve current parameters.\n *\n * @see `UrlCreationOptions#queryParamsHandling`\n * @see `RouterLink`\n * @publicApi\n */\nexport type QueryParamsHandling = 'merge'|'preserve'|'';\n\n/**\n *\n * A policy for when to run guards and resolvers on a route.\n *\n * @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)\n * @publicApi\n */\nexport type RunGuardsAndResolvers =\n    'pathParamsChange'|'pathParamsOrQueryParamsChange'|'paramsChange'|'paramsOrQueryParamsChange'|\n    'always'|((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * A configuration object that defines a single route.\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\n * The router attempts to match segments of a given URL against each route,\n * using the configuration options defined in this object.\n *\n * Supports static, parameterized, redirect, and wildcard routes, as well as\n * custom route data and resolve methods.\n *\n * For detailed usage information, see the [Routing Guide](guide/router).\n *\n * @usageNotes\n *\n * ### Simple Configuration\n *\n * The following route specifies that when navigating to, for example,\n * `/team/11/user/bob`, the router creates the 'Team' component\n * with the 'User' child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n  *  component: Team,\n *   children: [{\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * ### Multiple Outlets\n *\n * The following route creates sibling components with multiple outlets.\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team\n * }, {\n *   path: 'chat/:user',\n *   component: Chat\n *   outlet: 'aux'\n * }]\n * ```\n *\n * ### Wild Cards\n *\n * The following route uses wild-card notation to specify a component\n * that is always instantiated regardless of where you navigate to.\n *\n * ```\n * [{\n *   path: '**',\n *   component: WildcardComponent\n * }]\n * ```\n *\n * ### Redirects\n *\n * The following route uses the `redirectTo` property to ignore a segment of\n * a given URL when looking for a child path.\n *\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\n * the Team component with the User child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: 'legacy/user/:name',\n *     redirectTo: 'user/:name'\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * The redirect path can be relative, as shown in this example, or absolute.\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\n * the result URL is also absolute, '/user/jim'.\n\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any URL segments.\n *\n * In the following configuration, when navigating to\n * `/team/11`, the router instantiates the 'AllUsers' component.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: AllUsers\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * Empty-path routes can have children. In the following example, when navigating\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\n * the user component in it.\n *\n * Note that an empty path route inherits its parent's parameters and data.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: WrapperCmp,\n *     children: [{\n *       path: 'user/:name',\n *       component: User\n *     }]\n *   }]\n * }]\n * ```\n *\n * ### Matching Strategy\n *\n * The default path-match strategy is 'prefix', which means that the router\n * checks URL elements from the left to see if the URL matches a specified path.\n * For example, '/team/11/user' matches 'team/:id'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'prefix', //default\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * You can specify the path-match strategy 'full' to make sure that the path\n * covers the whole unconsumed URL. It is important to do this when redirecting\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating to the redirect destination,\n * creating an endless loop.\n *\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\n * that the router applies the redirect if and only if navigating to '/'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'full',\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * You can share parameters between sibling components.\n * For example, suppose that two sibling components should go next to each other,\n * and both of them require an ID parameter. You can accomplish this using a route\n * that does not specify a component at the top level.\n *\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\n * the main child and aux child components next to each other.\n * For this to work, the application component must have the primary and aux outlets defined.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: 'a', component: MainChild },\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * The router merges the parameters, data, and resolve of the componentless\n * parent into the parameters, data, and resolve of the children.\n *\n * This is especially useful when child components are defined\n * with an empty path string, as in the following example.\n * With this configuration, navigating to '/parent/10' creates\n * the main child and aux components.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: '', component: MainChild },\n *      { path: '', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up application load time by splitting the application\n * into multiple bundles and loading them on demand.\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\n * instead of the `children` property.\n *\n * Given the following example route, the router will lazy load\n * the associated module on demand using the browser native import system.\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @publicApi\n */\nexport interface Route {\n  /**\n   * The path to match against. Cannot be used together with a custom `matcher` function.\n   * A URL string that uses router matching notation.\n   * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\n   * Default is \"/\" (the root path).\n   *\n   */\n  path?: string;\n  /**\n   * The path-matching strategy, one of 'prefix' or 'full'.\n   * Default is 'prefix'.\n   *\n   * By default, the router checks URL elements from the left to see if the URL\n   * matches a given path and stops when there is a config match. Importantly there must still be a\n   * config match for each segment of the URL. For example, '/team/11/user' matches the prefix\n   * 'team/:id' if one of the route's children matches the segment 'user'. That is, the URL\n   * '/team/11/user` matches the config\n   * `{path: 'team/:id', children: [{path: ':user', component: User}]}`\n   * but does not match when there are no children as in `{path: 'team/:id', component: Team}`.\n   *\n   * The path-match strategy 'full' matches against the entire URL.\n   * It is important to do this when redirecting empty-path routes.\n   * Otherwise, because an empty path is a prefix of any URL,\n   * the router would apply the redirect even when navigating\n   * to the redirect destination, creating an endless loop.\n   *\n   */\n  pathMatch?: string;\n  /**\n   * A custom URL-matching function. Cannot be used together with `path`.\n   */\n  matcher?: UrlMatcher;\n  /**\n   * The component to instantiate when the path matches.\n   * Can be empty if child routes specify components.\n   */\n  component?: Type<any>;\n  /**\n   * A URL to redirect to when the path matches.\n   *\n   * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\n   * Note that no further redirects are evaluated after an absolute redirect.\n   *\n   * When not present, router does not redirect.\n   */\n  redirectTo?: string;\n  /**\n   * Name of a `RouterOutlet` object where the component can be placed\n   * when the path matches.\n   */\n  outlet?: string;\n  /**\n   * An array of dependency-injection tokens used to look up `CanActivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * activate the component. By default, any user can activate.\n   */\n  canActivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanActivateChild()` handlers,\n   * in order to determine if the current user is allowed to activate\n   * a child of the component. By default, any user can activate a child.\n   */\n  canActivateChild?: any[];\n  /**\n   * An array of DI tokens used to look up `CanDeactivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * deactivate the component. By default, any user can deactivate.\n   *\n   */\n  canDeactivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanLoad()`\n   * handlers, in order to determine if the current user is allowed to\n   * load the component. By default, any user can load.\n   */\n  canLoad?: any[];\n  /**\n   * Additional developer-defined data provided to the component via\n   * `ActivatedRoute`. By default, no additional data is passed.\n   */\n  data?: Data;\n  /**\n   * A map of DI tokens used to look up data resolvers. See `Resolve`.\n   */\n  resolve?: ResolveData;\n  /**\n   * An array of child `Route` objects that specifies a nested route\n   * configuration.\n   */\n  children?: Routes;\n  /**\n   * An object specifying lazy-loaded child routes.\n   */\n  loadChildren?: LoadChildren;\n  /**\n   * Defines when guards and resolvers will be run. One of\n   * - `paramsOrQueryParamsChange` : Run when query parameters change.\n   * - `always` : Run on every execution.\n   * By default, guards and resolvers run only when the matrix\n   * parameters of the route change.\n   */\n  runGuardsAndResolvers?: RunGuardsAndResolvers;\n  /**\n   * Filled for routes with `loadChildren` once the module has been loaded\n   * @internal\n   */\n  _loadedConfig?: LoadedRouterConfig;\n  /**\n   * Filled for routes with `loadChildren` during load\n   * @internal\n   */\n  _loader$?: Observable<LoadedRouterConfig>;\n}\n\nexport class LoadedRouterConfig {\n  constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n *   return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n *   return fn(1, 2);\n * } else {\n *   throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n  return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n  return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n  return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n  return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n  return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n  return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n  return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {combineLatest, Observable, OperatorFunction} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n    OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n  return switchMap(obs => {\n    return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n               .pipe(\n                   scan(\n                       (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n                         let isPending = false;\n                         return list.reduce((innerAcc, val, i: number) => {\n                           if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n                           // Toggle pending flag if any values haven't been set yet\n                           if (val === INITIAL_VALUE) isPending = true;\n\n                           // Any other return values are only valid if we haven't yet hit a pending\n                           // call. This guarantees that in the case of a guard at the bottom of the\n                           // tree that returns a redirect, we will wait for the higher priority\n                           // guard at the top to finish before performing the redirect.\n                           if (!isPending) {\n                             // Early return when we hit a `false` value as that should always\n                             // cancel navigation\n                             if (val === false) return val;\n\n                             if (i === list.length - 1 || isUrlTree(val)) {\n                               return val;\n                             }\n                           }\n\n                           return innerAcc;\n                         }, acc);\n                       },\n                       INITIAL_VALUE),\n                   filter(item => item !== INITIAL_VALUE),\n                   map(item => isUrlTree(item) ? item : item === true),  //\n                   take(1)) as Observable<boolean|UrlTree>;\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class ɵEmptyOutletComponent {\n}\n\nexport {ɵEmptyOutletComponent as EmptyOutletComponent};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EmptyOutletComponent} from '../components/empty_outlet';\nimport {Route, Routes} from '../config';\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n  // forEach doesn't iterate undefined values\n  for (let i = 0; i < config.length; i++) {\n    const route: Route = config[i];\n    const fullPath: string = getFullPath(parentPath, route);\n    validateNode(route, fullPath);\n  }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (!route) {\n      throw new Error(`\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n    }\n    if (Array.isArray(route)) {\n      throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n    }\n    if (!route.component && !route.children && !route.loadChildren &&\n        (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n    }\n    if (route.redirectTo && route.children) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and children cannot be used together`);\n    }\n    if (route.redirectTo && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and loadChildren cannot be used together`);\n    }\n    if (route.children && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': children and loadChildren cannot be used together`);\n    }\n    if (route.redirectTo && route.component) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and component cannot be used together`);\n    }\n    if (route.redirectTo && route.canActivate) {\n      throw new Error(\n          `Invalid configuration of route '${\n              fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n          `so canActivate will never be executed.`);\n    }\n    if (route.path && route.matcher) {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n    }\n    if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n    }\n    if (route.path === void 0 && route.matcher === void 0) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': routes must have either a path or a matcher specified`);\n    }\n    if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n    }\n    if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n      const exp =\n          `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n      throw new Error(`Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${\n          route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n    }\n    if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n    }\n  }\n  if (route.children) {\n    validateConfig(route.children, fullPath);\n  }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n  if (!currentRoute) {\n    return parentPath;\n  }\n  if (!parentPath && !currentRoute.path) {\n    return '';\n  } else if (parentPath && !currentRoute.path) {\n    return `${parentPath}/`;\n  } else if (!parentPath && currentRoute.path) {\n    return currentRoute.path;\n  } else {\n    return `${parentPath}/${currentRoute.path}`;\n  }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n  const children = r.children && r.children.map(standardizeConfig);\n  const c = children ? {...r, children} : {...r};\n  if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n    c.component = EmptyOutletComponent;\n  }\n  return c;\n}\n\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nexport function getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\n\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nexport function sortByMatchingOutlets(routes: Routes, outletName: string): Routes {\n  const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n  sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n  return sortedConfig;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from '../config';\nimport {defaultUrlMatcher, PRIMARY_OUTLET} from '../shared';\nimport {UrlSegment, UrlSegmentGroup} from '../url_tree';\n\nimport {forEach} from './collection';\nimport {getOutlet} from './config';\n\nexport interface MatchResult {\n  matched: boolean;\n  consumedSegments: UrlSegment[];\n  lastChild: number;\n  parameters: {[k: string]: string};\n  positionalParamSegments: {[k: string]: UrlSegment};\n}\n\nconst noMatch: MatchResult = {\n  matched: false,\n  consumedSegments: [],\n  lastChild: 0,\n  parameters: {},\n  positionalParamSegments: {}\n};\n\nexport function match(\n    segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n  if (route.path === '') {\n    if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n      return {...noMatch};\n    }\n\n    return {\n      matched: true,\n      consumedSegments: [],\n      lastChild: 0,\n      parameters: {},\n      positionalParamSegments: {}\n    };\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n  if (!res) return {...noMatch};\n\n  const posParams: {[n: string]: string} = {};\n  forEach(res.posParams!, (v: UrlSegment, k: string) => {\n    posParams[k] = v.path;\n  });\n  const parameters = res.consumed.length > 0 ?\n      {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n      posParams;\n\n  return {\n    matched: true,\n    consumedSegments: res.consumed,\n    lastChild: res.consumed.length,\n    // TODO(atscott): investigate combining parameters and positionalParamSegments\n    parameters,\n    positionalParamSegments: res.posParams ?? {}\n  };\n}\n\nexport function split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[], relativeLinkResolution: 'legacy'|'corrected' = 'corrected') {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments,\n        createChildrenForEmptyPaths(\n            segmentGroup, consumedSegments, config,\n            new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments,\n        addEmptyPathsToChildrenIfNeeded(\n            segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children,\n            relativeLinkResolution));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments};\n  }\n\n  const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n  s._sourceSegment = segmentGroup;\n  s._segmentIndexShift = consumedSegments.length;\n  return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    routes: Route[], children: {[name: string]: UrlSegmentGroup},\n    relativeLinkResolution: 'legacy'|'corrected'): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  for (const r of routes) {\n    if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      if (relativeLinkResolution === 'legacy') {\n        s._segmentIndexShift = segmentGroup.segments.length;\n      } else {\n        s._segmentIndexShift = consumedSegments.length;\n      }\n      res[getOutlet(r)] = s;\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n    primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegment;\n  primarySegment._sourceSegment = segmentGroup;\n  primarySegment._segmentIndexShift = consumedSegments.length;\n\n  for (const r of routes) {\n    if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      s._segmentIndexShift = consumedSegments.length;\n      res[getOutlet(r)] = s;\n    }\n  }\n  return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '';\n}\n\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nexport function isImmediateMatch(\n    route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n  // a config like\n  // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n  // or even\n  // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n  //\n  // The exception here is when the segment outlet is for the primary outlet. This would\n  // result in a match inside the named outlet because all children there are written as primary\n  // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n  // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n  // This should only match if the url is `/(x:b)`.\n  if (getOutlet(route) !== outlet &&\n      (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n    return false;\n  }\n  if (route.path === '**') {\n    return true;\n  }\n  return match(rawSegment, route, segments).matched;\n}\n\nexport function noLeftoversInUrl(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  return segments.length === 0 && !segmentGroup.children[outlet];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, from, Observable, Observer, of} from 'rxjs';\nimport {catchError, concatMap, first, last, map, mergeMap, scan, tap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {prioritizedGuardValue} from './operators/prioritized_guard_value';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {navigationCancelingError, Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, wrapIntoObservable} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {isCanLoad, isFunction, isUrlTree} from './utils/type_guards';\n\nclass NoMatch {\n  public segmentGroup: UrlSegmentGroup|null;\n\n  constructor(segmentGroup?: UrlSegmentGroup) {\n    this.segmentGroup = segmentGroup || null;\n  }\n}\n\nclass AbsoluteRedirect {\n  constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n          `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n  return new Observable<LoadedRouterConfig>(\n      (obs: Observer<LoadedRouterConfig>) => obs.error(\n          navigationCancelingError(`Cannot load children because the guard of the route \"path: '${\n              route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n  return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n  private allowRedirects: boolean = true;\n  private ngModule: NgModuleRef<any>;\n\n  constructor(\n      moduleInjector: Injector, private configLoader: RouterConfigLoader,\n      private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n    this.ngModule = moduleInjector.get(NgModuleRef);\n  }\n\n  apply(): Observable<UrlTree> {\n    const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n    // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is\n    // only necessary to prevent failures in tests which assert exact object matches. The `split` is\n    // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these\n    // properties. Before the implementations were merged, the `applyRedirects` would not assign\n    // them. We should be able to remove this logic as a \"breaking change\" but should do some more\n    // investigation into the failures first.\n    const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children);\n\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    const urlTrees$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n    }));\n    return urlTrees$.pipe(catchError((e: any) => {\n      if (e instanceof AbsoluteRedirect) {\n        // After an absolute redirect we do not apply any more redirects!\n        // If this implementation changes, update the documentation note in `redirectTo`.\n        this.allowRedirects = false;\n        // we need to run matching, so we can fetch all lazy-loaded modules\n        return this.match(e.urlTree);\n      }\n\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private match(tree: UrlTree): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n    const mapped$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n    }));\n    return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private noMatchError(e: NoMatch): any {\n    return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n  }\n\n  private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string|null):\n      UrlTree {\n    const root = rootCandidate.segments.length > 0 ?\n        new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n        rootCandidate;\n    return new UrlTree(root, queryParams, fragment);\n  }\n\n  private expandSegmentGroup(\n      ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n      outlet: string): Observable<UrlSegmentGroup> {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.expandChildren(ngModule, routes, segmentGroup)\n          .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n    }\n\n    return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n  }\n\n  // Recursively expand segment groups for all the child outlets\n  private expandChildren(\n      ngModule: NgModuleRef<any>, routes: Route[],\n      segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n    // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n    // because an absolute redirect from the primary outlet takes precedence.\n    const childOutlets: string[] = [];\n    for (const child of Object.keys(segmentGroup.children)) {\n      if (child === 'primary') {\n        childOutlets.unshift(child);\n      } else {\n        childOutlets.push(child);\n      }\n    }\n\n    return from(childOutlets)\n        .pipe(\n            concatMap(childOutlet => {\n              const child = segmentGroup.children[childOutlet];\n              // Sort the routes so routes with outlets that match the segment appear\n              // first, followed by routes for other outlets, which might match if they have an\n              // empty path.\n              const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n              return this.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet)\n                  .pipe(map(s => ({segment: s, outlet: childOutlet})));\n            }),\n            scan(\n                (children, expandedChild) => {\n                  children[expandedChild.outlet] = expandedChild.segment;\n                  return children;\n                },\n                {} as {[outlet: string]: UrlSegmentGroup}),\n            last(),\n        );\n  }\n\n  private expandSegment(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n      segments: UrlSegment[], outlet: string,\n      allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    return from(routes).pipe(\n        concatMap((r: any) => {\n          const expanded$ = this.expandSegmentAgainstRoute(\n              ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n          return expanded$.pipe(catchError((e: any) => {\n            if (e instanceof NoMatch) {\n              return of(null);\n            }\n            throw e;\n          }));\n        }),\n        first((s): s is UrlSegmentGroup => !!s), catchError((e: any, _: any) => {\n          if (e instanceof EmptyError || e.name === 'EmptyError') {\n            if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n              return of(new UrlSegmentGroup([], {}));\n            }\n            throw new NoMatch(segmentGroup);\n          }\n          throw e;\n        }));\n  }\n\n  private expandSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n      return noMatch(segmentGroup);\n    }\n\n    if (route.redirectTo === undefined) {\n      return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet);\n    }\n\n    if (allowRedirects && this.allowRedirects) {\n      return this.expandSegmentAgainstRouteUsingRedirect(\n          ngModule, segmentGroup, routes, route, paths, outlet);\n    }\n\n    return noMatch(segmentGroup);\n  }\n\n  private expandSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n          ngModule, routes, route, outlet);\n    }\n\n    return this.expandRegularSegmentAgainstRouteUsingRedirect(\n        ngModule, segmentGroup, routes, route, segments, outlet);\n  }\n\n  private expandWildCardWithParamsAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n      outlet: string): Observable<UrlSegmentGroup> {\n    const newTree = this.applyRedirectCommands([], route.redirectTo!, {});\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      const group = new UrlSegmentGroup(newSegments, {});\n      return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n    }));\n  }\n\n  private expandRegularSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    const {matched, consumedSegments, lastChild, positionalParamSegments} =\n        match(segmentGroup, route, segments);\n    if (!matched) return noMatch(segmentGroup);\n\n    const newTree =\n        this.applyRedirectCommands(consumedSegments, route.redirectTo!, positionalParamSegments);\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      return this.expandSegment(\n          ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n          false);\n    }));\n  }\n\n  private matchSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      if (route.loadChildren) {\n        const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                              this.configLoader.load(ngModule.injector, route);\n        return loaded$.pipe(map((cfg: LoadedRouterConfig) => {\n          route._loadedConfig = cfg;\n          return new UrlSegmentGroup(segments, {});\n        }));\n      }\n\n      return of(new UrlSegmentGroup(segments, {}));\n    }\n\n    const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n    if (!matched) return noMatch(rawSegmentGroup);\n\n    const rawSlicedSegments = segments.slice(lastChild);\n    const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n    return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n      const childModule = routerConfig.module;\n      const childConfig = routerConfig.routes;\n\n      const {segmentGroup: splitSegmentGroup, slicedSegments} =\n          split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n      // See comment on the other call to `split` about why this is necessary.\n      const segmentGroup =\n          new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n\n      if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n        const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n        return expanded$.pipe(\n            map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n      }\n\n      if (childConfig.length === 0 && slicedSegments.length === 0) {\n        return of(new UrlSegmentGroup(consumedSegments, {}));\n      }\n\n      const matchedOnOutlet = getOutlet(route) === outlet;\n      const expanded$ = this.expandSegment(\n          childModule, segmentGroup, childConfig, slicedSegments,\n          matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n      return expanded$.pipe(\n          map((cs: UrlSegmentGroup) =>\n                  new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n    }));\n  }\n\n  private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n      Observable<LoadedRouterConfig> {\n    if (route.children) {\n      // The children belong to the same module\n      return of(new LoadedRouterConfig(route.children, ngModule));\n    }\n\n    if (route.loadChildren) {\n      // lazy children belong to the loaded module\n      if (route._loadedConfig !== undefined) {\n        return of(route._loadedConfig);\n      }\n\n      return this.runCanLoadGuards(ngModule.injector, route, segments)\n          .pipe(mergeMap((shouldLoadResult: boolean) => {\n            if (shouldLoadResult) {\n              return this.configLoader.load(ngModule.injector, route)\n                  .pipe(map((cfg: LoadedRouterConfig) => {\n                    route._loadedConfig = cfg;\n                    return cfg;\n                  }));\n            }\n            return canLoadFails(route);\n          }));\n    }\n\n    return of(new LoadedRouterConfig([], ngModule));\n  }\n\n  private runCanLoadGuards(moduleInjector: Injector, route: Route, segments: UrlSegment[]):\n      Observable<boolean> {\n    const canLoad = route.canLoad;\n    if (!canLoad || canLoad.length === 0) return of(true);\n\n    const canLoadObservables = canLoad.map((injectionToken: any) => {\n      const guard = moduleInjector.get(injectionToken);\n      let guardVal;\n      if (isCanLoad(guard)) {\n        guardVal = guard.canLoad(route, segments);\n      } else if (isFunction<CanLoadFn>(guard)) {\n        guardVal = guard(route, segments);\n      } else {\n        throw new Error('Invalid CanLoad guard');\n      }\n      return wrapIntoObservable(guardVal);\n    });\n\n    return of(canLoadObservables)\n        .pipe(\n            prioritizedGuardValue(),\n            tap((result: UrlTree|boolean) => {\n              if (!isUrlTree(result)) return;\n\n              const error: Error&{url?: UrlTree} = navigationCancelingError(\n                  `Redirecting to \"${this.urlSerializer.serialize(result)}\"`);\n              error.url = result;\n              throw error;\n            }),\n            map(result => result === true),\n        );\n  }\n\n  private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n    let res: UrlSegment[] = [];\n    let c = urlTree.root;\n    while (true) {\n      res = res.concat(c.segments);\n      if (c.numberOfChildren === 0) {\n        return of(res);\n      }\n\n      if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n        return namedOutletsRedirect(route.redirectTo!);\n      }\n\n      c = c.children[PRIMARY_OUTLET];\n    }\n  }\n\n  private applyRedirectCommands(\n      segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n    return this.applyRedirectCreatreUrlTree(\n        redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n  }\n\n  private applyRedirectCreatreUrlTree(\n      redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlTree {\n    const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n    return new UrlTree(\n        newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n        urlTree.fragment);\n  }\n\n  private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n    const res: Params = {};\n    forEach(redirectToParams, (v: any, k: string) => {\n      const copySourceValue = typeof v === 'string' && v.startsWith(':');\n      if (copySourceValue) {\n        const sourceName = v.substring(1);\n        res[k] = actualParams[sourceName];\n      } else {\n        res[k] = v;\n      }\n    });\n    return res;\n  }\n\n  private createSegmentGroup(\n      redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n    const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n    let children: {[n: string]: UrlSegmentGroup} = {};\n    forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n      children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n    });\n\n    return new UrlSegmentGroup(updatedSegments, children);\n  }\n\n  private createSegments(\n      redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n    return redirectToSegments.map(\n        s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n                                      this.findOrReturn(s, actualSegments));\n  }\n\n  private findPosParam(\n      redirectTo: string, redirectToUrlSegment: UrlSegment,\n      posParams: {[k: string]: UrlSegment}): UrlSegment {\n    const pos = posParams[redirectToUrlSegment.path.substring(1)];\n    if (!pos)\n      throw new Error(\n          `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n    return pos;\n  }\n\n  private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n    let idx = 0;\n    for (const s of actualSegments) {\n      if (s.path === redirectToUrlSegment.path) {\n        actualSegments.splice(idx);\n        return s;\n      }\n      idx++;\n    }\n    return redirectToUrlSegment;\n  }\n}\n\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n  if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n    const c = s.children[PRIMARY_OUTLET];\n    return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n  }\n\n  return s;\n}\n\n/**\n * Recursively merges primary segment children into their parents and also drops empty children\n * (those which have no segments and no children themselves). The latter prevents serializing a\n * group into something like `/a(aux:)`, where `aux` is an empty child segment.\n */\nfunction squashSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  const newChildren = {} as any;\n  for (const childOutlet of Object.keys(segmentGroup.children)) {\n    const child = segmentGroup.children[childOutlet];\n    const childCandidate = squashSegmentGroup(child);\n    // don't add empty children\n    if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n      newChildren[childOutlet] = childCandidate;\n    }\n  }\n  const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n  return mergeTrivialChildren(s);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n  return switchMap(\n      t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n               .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, equalParamsAndUrlSegments, RouterStateSnapshot} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport class CanActivate {\n  readonly route: ActivatedRouteSnapshot;\n  constructor(public path: ActivatedRouteSnapshot[]) {\n    this.route = this.path[this.path.length - 1];\n  }\n}\n\nexport class CanDeactivate {\n  constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n  canDeactivateChecks: CanDeactivate[],\n  canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n    future: RouterStateSnapshot, curr: RouterStateSnapshot,\n    parentContexts: ChildrenOutletContexts) {\n  const futureRoot = future._root;\n  const currRoot = curr ? curr._root : null;\n\n  return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n    {node: ActivatedRouteSnapshot, guards: any[]}|null {\n  const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n  if (!canActivateChild || canActivateChild.length === 0) return null;\n  return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n    token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n  const config = getClosestLoadedConfig(snapshot);\n  const injector = config ? config.module.injector : moduleInjector;\n  return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  if (!snapshot) return null;\n\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n  }\n\n  return null;\n}\n\nfunction getChildRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>|null,\n    contexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[], checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const prevChildren = nodeChildrenAsMap(currNode);\n\n  // Process the children of the future route\n  futureNode.children.forEach(c => {\n    getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n    delete prevChildren[c.value.outlet];\n  });\n\n  // Process any children left from the current route (not active for the future route)\n  forEach(\n      prevChildren,\n      (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n          deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks));\n\n  return checks;\n}\n\nfunction getRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n    parentContexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[],\n    checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const future = futureNode.value;\n  const curr = currNode ? currNode.value : null;\n  const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n  // reusing the node\n  if (curr && future.routeConfig === curr.routeConfig) {\n    const shouldRun =\n        shouldRunGuardsAndResolvers(curr, future, future.routeConfig!.runGuardsAndResolvers);\n    if (shouldRun) {\n      checks.canActivateChecks.push(new CanActivate(futurePath));\n    } else {\n      // we need to set the data\n      future.data = curr.data;\n      future._resolvedData = curr._resolvedData;\n    }\n\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(\n          futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n    }\n\n    if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n      checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n    }\n  } else {\n    if (curr) {\n      deactivateRouteAndItsChildren(currNode, context, checks);\n    }\n\n    checks.canActivateChecks.push(new CanActivate(futurePath));\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n    }\n  }\n\n  return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n    curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n    mode: RunGuardsAndResolvers|undefined): boolean {\n  if (typeof mode === 'function') {\n    return mode(curr, future);\n  }\n  switch (mode) {\n    case 'pathParamsChange':\n      return !equalPath(curr.url, future.url);\n\n    case 'pathParamsOrQueryParamsChange':\n      return !equalPath(curr.url, future.url) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'always':\n      return true;\n\n    case 'paramsOrQueryParamsChange':\n      return !equalParamsAndUrlSegments(curr, future) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'paramsChange':\n    default:\n      return !equalParamsAndUrlSegments(curr, future);\n  }\n}\n\nfunction deactivateRouteAndItsChildren(\n    route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext|null, checks: Checks): void {\n  const children = nodeChildrenAsMap(route);\n  const r = route.value;\n\n  forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n    if (!r.component) {\n      deactivateRouteAndItsChildren(node, context, checks);\n    } else if (context) {\n      deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n    } else {\n      deactivateRouteAndItsChildren(node, null, checks);\n    }\n  });\n\n  if (!r.component) {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  } else if (context && context.outlet && context.outlet.isActivated) {\n    checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n  } else {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {concat, defer, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n    MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n    if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n      return of({...t, guardsResult: true});\n    }\n\n    return runCanDeactivateChecks(\n               canDeactivateChecks, targetSnapshot!, currentSnapshot, moduleInjector)\n        .pipe(\n            mergeMap(canDeactivate => {\n              return canDeactivate && isBoolean(canDeactivate) ?\n                  runCanActivateChecks(\n                      targetSnapshot!, canActivateChecks, moduleInjector, forwardEvent) :\n                  of(canDeactivate);\n            }),\n            map(guardsResult => ({...t, guardsResult})));\n  });\n}\n\nfunction runCanDeactivateChecks(\n    checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n    moduleInjector: Injector) {\n  return from(checks).pipe(\n      mergeMap(\n          check =>\n              runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n    futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n    forwardEvent?: (evt: Event) => void) {\n  return from(checks).pipe(\n      concatMap((check: CanActivate) => {\n        return concat(\n            fireChildActivationStart(check.route.parent, forwardEvent),\n            fireActivationStart(check.route, forwardEvent),\n            runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n            runCanActivate(futureSnapshot, check.route, moduleInjector));\n      }),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ActivationStart(snapshot));\n  }\n  return of(true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ChildActivationStart(snapshot));\n  }\n  return of(true);\n}\n\nfunction runCanActivate(\n    futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n  if (!canActivate || canActivate.length === 0) return of(true);\n\n  const canActivateObservables = canActivate.map((c: any) => {\n    return defer(() => {\n      const guard = getToken(c, futureARS, moduleInjector);\n      let observable;\n      if (isCanActivate(guard)) {\n        observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n      } else if (isFunction<CanActivateFn>(guard)) {\n        observable = wrapIntoObservable(guard(futureARS, futureRSS));\n      } else {\n        throw new Error('Invalid CanActivate guard');\n      }\n      return observable.pipe(first());\n    });\n  });\n  return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n    futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const futureARS = path[path.length - 1];\n\n  const canActivateChildGuards = path.slice(0, path.length - 1)\n                                     .reverse()\n                                     .map(p => getCanActivateChild(p))\n                                     .filter(_ => _ !== null);\n\n  const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n    return defer(() => {\n      const guardsMapped = d.guards.map((c: any) => {\n        const guard = getToken(c, d.node, moduleInjector);\n        let observable;\n        if (isCanActivateChild(guard)) {\n          observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n        } else if (isFunction<CanActivateChildFn>(guard)) {\n          observable = wrapIntoObservable(guard(futureARS, futureRSS));\n        } else {\n          throw new Error('Invalid CanActivateChild guard');\n        }\n        return observable.pipe(first());\n      });\n      return of(guardsMapped).pipe(prioritizedGuardValue());\n    });\n  });\n  return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n    component: Object|null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n    futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n  if (!canDeactivate || canDeactivate.length === 0) return of(true);\n  const canDeactivateObservables = canDeactivate.map((c: any) => {\n    const guard = getToken(c, currARS, moduleInjector);\n    let observable;\n    if (isCanDeactivate(guard)) {\n      observable = wrapIntoObservable(guard.canDeactivate(component!, currARS, currRSS, futureRSS));\n    } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n      observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n    } else {\n      throw new Error('Invalid CanDeactivate guard');\n    }\n    return observable.pipe(first());\n  });\n  return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of} from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, ParamsInheritanceStrategy, RouterStateSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {last} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nfunction newObservableError(e: unknown): Observable<RouterStateSnapshot> {\n  // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n  return new Observable<RouterStateSnapshot>((obs: Observer<RouterStateSnapshot>) => obs.error(e));\n}\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Routes, urlTree: UrlTree, url: string,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n    relativeLinkResolution: 'legacy'|'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n  try {\n    const result = new Recognizer(\n                       rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n                       relativeLinkResolution)\n                       .recognize();\n    if (result === null) {\n      return newObservableError(new NoMatch());\n    } else {\n      return of(result);\n    }\n  } catch (e) {\n    // Catch the potential error from recognize due to duplicate outlet matches and return as an\n    // `Observable` error instead.\n    return newObservableError(e);\n  }\n}\n\nexport class Recognizer {\n  constructor(\n      private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n      private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n      private relativeLinkResolution: 'legacy'|'corrected') {}\n\n  recognize(): RouterStateSnapshot|null {\n    const rootSegmentGroup =\n        split(\n            this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined),\n            this.relativeLinkResolution)\n            .segmentGroup;\n\n    const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    if (children === null) {\n      return null;\n    }\n\n    // Use Object.freeze to prevent readers of the Router state from modifying it outside of a\n    // navigation, resulting in the router being out of sync with the browser.\n    const root = new ActivatedRouteSnapshot(\n        [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n        {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n\n    const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n    const routeState = new RouterStateSnapshot(this.url, rootNode);\n    this.inheritParamsAndData(routeState._root);\n    return routeState;\n  }\n\n  inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n    const route = routeNode.value;\n\n    const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n    route.params = Object.freeze(i.params);\n    route.data = Object.freeze(i.data);\n\n    routeNode.children.forEach(n => this.inheritParamsAndData(n));\n  }\n\n  processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.processChildren(config, segmentGroup);\n    }\n\n    return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n  }\n\n  /**\n   * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n   * we cannot find a match for _any_ of the children.\n   *\n   * @param config - The `Routes` to match against\n   * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n   *     config.\n   */\n  processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    const children: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n    for (const childOutlet of Object.keys(segmentGroup.children)) {\n      const child = segmentGroup.children[childOutlet];\n      // Sort the config so that routes with outlets that match the one being activated appear\n      // first, followed by routes for other outlets, which might match if they have an empty path.\n      const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n      const outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet);\n      if (outletChildren === null) {\n        // Configs must match all segment children so because we did not find a match for this\n        // outlet, return `null`.\n        return null;\n      }\n      children.push(...outletChildren);\n    }\n    // Because we may have matched two outlets to the same empty path segment, we can have multiple\n    // activated results for the same outlet. We should merge the children of these results so the\n    // final return value is only one `TreeNode` per outlet.\n    const mergedChildren = mergeEmptyPathMatches(children);\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      // This should really never happen - we are only taking the first match for each outlet and\n      // merge the empty path matches.\n      checkOutletNameUniqueness(mergedChildren);\n    }\n    sortActivatedRouteSnapshots(mergedChildren);\n    return mergedChildren;\n  }\n\n  processSegment(\n      config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    for (const r of config) {\n      const children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n      if (children !== null) {\n        return children;\n      }\n    }\n    if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n      return [];\n    }\n\n    return null;\n  }\n\n  processSegmentAgainstRoute(\n      route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return null;\n\n    let snapshot: ActivatedRouteSnapshot;\n    let consumedSegments: UrlSegment[] = [];\n    let rawSlicedSegments: UrlSegment[] = [];\n\n    if (route.path === '**') {\n      const params = segments.length > 0 ? last(segments)!.parameters : {};\n      snapshot = new ActivatedRouteSnapshot(\n          segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n          getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length,\n          getResolve(route));\n    } else {\n      const result = match(rawSegment, route, segments);\n      if (!result.matched) {\n        return null;\n      }\n      consumedSegments = result.consumedSegments;\n      rawSlicedSegments = segments.slice(result.lastChild);\n\n      snapshot = new ActivatedRouteSnapshot(\n          consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment, getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n    }\n\n    const childConfig: Route[] = getChildConfig(route);\n\n    const {segmentGroup, slicedSegments} = split(\n        rawSegment, consumedSegments, rawSlicedSegments,\n        // Filter out routes with redirectTo because we are trying to create activated route\n        // snapshots and don't handle redirects here. That should have been done in\n        // `applyRedirects`.\n        childConfig.filter(c => c.redirectTo === undefined), this.relativeLinkResolution);\n\n    if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n      const children = this.processChildren(childConfig, segmentGroup);\n      if (children === null) {\n        return null;\n      }\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n    }\n\n    if (childConfig.length === 0 && slicedSegments.length === 0) {\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n    }\n\n    const matchedOnOutlet = getOutlet(route) === outlet;\n    // If we matched a config due to empty path match on a different outlet, we need to continue\n    // passing the current outlet for the segment rather than switch to PRIMARY.\n    // Note that we switch to primary when we have a match because outlet configs look like this:\n    // {path: 'a', outlet: 'a', children: [\n    //  {path: 'b', component: B},\n    //  {path: 'c', component: C},\n    // ]}\n    // Notice that the children of the named outlet are configured with the primary outlet\n    const children = this.processSegment(\n        childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet);\n    if (children === null) {\n      return null;\n    }\n    return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n  }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  nodes.sort((a, b) => {\n    if (a.value.outlet === PRIMARY_OUTLET) return -1;\n    if (b.value.outlet === PRIMARY_OUTLET) return 1;\n    return a.value.outlet.localeCompare(b.value.outlet);\n  });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n  if (route.children) {\n    return route.children;\n  }\n\n  if (route.loadChildren) {\n    return route._loadedConfig!.routes;\n  }\n\n  return [];\n}\n\nfunction hasEmptyPathConfig(node: TreeNode<ActivatedRouteSnapshot>) {\n  const config = node.value.routeConfig;\n  return config && config.path === '' && config.redirectTo === undefined;\n}\n\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the\n * children from each duplicate. This is necessary because different outlets can match a single\n * empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes: Array<TreeNode<ActivatedRouteSnapshot>>):\n    Array<TreeNode<ActivatedRouteSnapshot>> {\n  const result: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n  // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n  const mergedNodes: Set<TreeNode<ActivatedRouteSnapshot>> = new Set();\n\n  for (const node of nodes) {\n    if (!hasEmptyPathConfig(node)) {\n      result.push(node);\n      continue;\n    }\n\n    const duplicateEmptyPathNode =\n        result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n    if (duplicateEmptyPathNode !== undefined) {\n      duplicateEmptyPathNode.children.push(...node.children);\n      mergedNodes.add(duplicateEmptyPathNode);\n    } else {\n      result.push(node);\n    }\n  }\n  // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n  // by also merging those children. This is necessary when there are multiple empty path configs in\n  // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n  // of those children can be combined into a single node as well.\n  for (const mergedNode of mergedNodes) {\n    const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n    result.push(new TreeNode(mergedNode.value, mergedChildren));\n  }\n  return result.filter(n => !mergedNodes.has(n));\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  const names: {[k: string]: ActivatedRouteSnapshot} = {};\n  nodes.forEach(n => {\n    const routeWithSameOutletName = names[n.value.outlet];\n    if (routeWithSameOutletName) {\n      const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n      const c = n.value.url.map(s => s.toString()).join('/');\n      throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n    }\n    names[n.value.outlet] = n.value;\n  });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  let s = segmentGroup;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n  }\n  return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n  let s = segmentGroup;\n  let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  }\n  return res - 1;\n}\n\nfunction getData(route: Route): Data {\n  return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n  return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Route[], serializer: (url: UrlTree) => string,\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    relativeLinkResolution: 'legacy'|'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(\n      t => recognizeFn(\n               rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n               paramsInheritanceStrategy, relativeLinkResolution)\n               .pipe(map(targetSnapshot => ({...t, targetSnapshot}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {EMPTY, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, map, mergeMap, takeLast, tap} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, RouterStateSnapshot} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n    if (!canActivateChecks.length) {\n      return of(t);\n    }\n    let canActivateChecksResolved = 0;\n    return from(canActivateChecks)\n        .pipe(\n            concatMap(\n                check => runResolve(\n                    check.route, targetSnapshot!, paramsInheritanceStrategy, moduleInjector)),\n            tap(() => canActivateChecksResolved++),\n            takeLast(1),\n            mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY),\n        );\n  });\n}\n\nfunction runResolve(\n    futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    paramsInheritanceStrategy: 'emptyOnly'|'always', moduleInjector: Injector) {\n  const resolve = futureARS._resolve;\n  return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n      .pipe(map((resolvedData: any) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = {\n          ...futureARS.data,\n          ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve\n        };\n        return null;\n      }));\n}\n\nfunction resolveNode(\n    resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const keys = Object.keys(resolve);\n  if (keys.length === 0) {\n    return of({});\n  }\n  const data: {[k: string]: any} = {};\n  return from(keys).pipe(\n      mergeMap(\n          (key: string) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n                               .pipe(tap((value: any) => {\n                                 data[key] = value;\n                               }))),\n      takeLast(1),\n      mergeMap(() => {\n        // Ensure all resolvers returned values, otherwise don't emit any \"next\" and just complete\n        // the chain which will cancel navigation\n        if (Object.keys(data).length === keys.length) {\n          return of(data);\n        }\n        return EMPTY;\n      }),\n  );\n}\n\nfunction getResolver(\n    injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const resolver = getToken(injectionToken, futureARS, moduleInjector);\n  return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n                            wrapIntoObservable(resolver(futureARS, futureRSS));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {from, MonoTypeOperatorFunction, ObservableInput, of} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n    MonoTypeOperatorFunction<T> {\n  return switchMap(v => {\n    const nextResult = next(v);\n    if (nextResult) {\n      return from(nextResult).pipe(map(() => v));\n    }\n    return of(v);\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n  contexts: Map<string, OutletContext>,\n  componentRef: ComponentRef<any>,\n  route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n  /** Determines if this route (and its subtree) should be detached to be reused later */\n  abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n  /**\n   * Stores the detached route.\n   *\n   * Storing a `null` value should erase the previously stored value.\n   */\n  abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n  /** Determines if this route (and its subtree) should be reattached */\n  abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n  /** Retrieves the previously stored route */\n  abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n  /** Determines if a route should be reused */\n  abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the fragment or query parameters change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nexport abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\n  /**\n   * Whether the given route should detach for later reuse.\n   * Always returns false for `BaseRouteReuseStrategy`.\n   * */\n  shouldDetach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /**\n   * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n   */\n  store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n\n  /** Returns `false`, meaning the route (and its subtree) is never reattached */\n  shouldAttach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /** Returns `null` because this strategy does not store routes for later re-use. */\n  retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null {\n    return null;\n  }\n\n  /**\n   * Determines if a route should be reused.\n   * This strategy returns `true` when the future route config and current route config are\n   * identical.\n   */\n  shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n    return future.routeConfig === curr.routeConfig;\n  }\n}\n\nexport class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectFlags, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {ConnectableObservable, from, Observable, of, Subject} from 'rxjs';\nimport {catchError, map, mergeMap, refCount, tap} from 'rxjs/operators';\n\nimport {LoadChildren, LoadedRouterConfig, Route} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\nimport {standardizeConfig} from './utils/config';\n\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n  constructor(\n      private loader: NgModuleFactoryLoader, private compiler: Compiler,\n      private onLoadStartListener?: (r: Route) => void,\n      private onLoadEndListener?: (r: Route) => void) {}\n\n  load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n    if (route._loader$) {\n      return route._loader$;\n    }\n\n    if (this.onLoadStartListener) {\n      this.onLoadStartListener(route);\n    }\n    const moduleFactory$ = this.loadModuleFactory(route.loadChildren!);\n    const loadRunner = moduleFactory$.pipe(\n        map((factory: NgModuleFactory<any>) => {\n          if (this.onLoadEndListener) {\n            this.onLoadEndListener(route);\n          }\n          const module = factory.create(parentInjector);\n          // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n          // will get stuck in an infinite loop. The child module's Injector will look to\n          // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n          // for it's parent module instead.\n          return new LoadedRouterConfig(\n              flatten(\n                  module.injector.get(ROUTES, undefined, InjectFlags.Self | InjectFlags.Optional))\n                  .map(standardizeConfig),\n              module);\n        }),\n        catchError((err) => {\n          route._loader$ = undefined;\n          throw err;\n        }),\n    );\n    // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n    route._loader$ = new ConnectableObservable(loadRunner, () => new Subject<LoadedRouterConfig>())\n                         .pipe(refCount());\n    return route._loader$;\n  }\n\n  private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n    if (typeof loadChildren === 'string') {\n      return from(this.loader.load(loadChildren));\n    } else {\n      return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n        if (t instanceof NgModuleFactory) {\n          return of(t);\n        } else {\n          return from(this.compiler.compileModuleAsync(t));\n        }\n      }));\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutletContract} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n  outlet: RouterOutletContract|null = null;\n  route: ActivatedRoute|null = null;\n  resolver: ComponentFactoryResolver|null = null;\n  children = new ChildrenOutletContexts();\n  attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n  // contexts for child outlets, by name.\n  private contexts = new Map<string, OutletContext>();\n\n  /** Called when a `RouterOutlet` directive is instantiated */\n  onChildOutletCreated(childName: string, outlet: RouterOutletContract): void {\n    const context = this.getOrCreateContext(childName);\n    context.outlet = outlet;\n    this.contexts.set(childName, context);\n  }\n\n  /**\n   * Called when a `RouterOutlet` directive is destroyed.\n   * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n   * re-created later.\n   */\n  onChildOutletDestroyed(childName: string): void {\n    const context = this.getContext(childName);\n    if (context) {\n      context.outlet = null;\n      context.attachRef = null;\n    }\n  }\n\n  /**\n   * Called when the corresponding route is deactivated during navigation.\n   * Because the component get destroyed, all children outlet are destroyed.\n   */\n  onOutletDeactivated(): Map<string, OutletContext> {\n    const contexts = this.contexts;\n    this.contexts = new Map();\n    return contexts;\n  }\n\n  onOutletReAttached(contexts: Map<string, OutletContext>) {\n    this.contexts = contexts;\n  }\n\n  getOrCreateContext(childName: string): OutletContext {\n    let context = this.getContext(childName);\n\n    if (!context) {\n      context = new OutletContext();\n      this.contexts.set(childName, context);\n    }\n\n    return context;\n  }\n\n  getContext(childName: string): OutletContext|null {\n    return this.contexts.get(childName) || null;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n  /**\n   * Tells the router if this URL should be processed.\n   *\n   * When it returns true, the router will execute the regular navigation.\n   * When it returns false, the router will set the router state to an empty state.\n   * As a result, all the active components will be destroyed.\n   *\n   */\n  abstract shouldProcessUrl(url: UrlTree): boolean;\n\n  /**\n   * Extracts the part of the URL that should be handled by the router.\n   * The rest of the URL will remain untouched.\n   */\n  abstract extract(url: UrlTree): UrlTree;\n\n  /**\n   * Merges the URL fragment with the rest of the URL.\n   */\n  abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n  shouldProcessUrl(url: UrlTree): boolean {\n    return true;\n  }\n  extract(url: UrlTree): UrlTree {\n    return url;\n  }\n  merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree {\n    return newUrlPart;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, PopStateEvent} from '@angular/common';\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, of, Subject, SubscriptionLike} from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, createEmptyState, RouterState, RouterStateSnapshot} from './router_state';\nimport {isNavigationCancelingError, navigationCancelingError, Params} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {containsTree, createEmptyUrlTree, IsActiveMatchOptions, UrlSerializer, UrlTree} from './url_tree';\nimport {standardizeConfig, validateConfig} from './utils/config';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n/**\n * @description\n *\n * Options that modify the `Router` URL.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface UrlCreationOptions {\n  /**\n   * Specifies a root URI to use for relative navigation.\n   *\n   * For example, consider the following route configuration where the parent route\n   * has two children.\n   *\n   * ```\n   * [{\n   *   path: 'parent',\n   *   component: ParentComponent,\n   *   children: [{\n   *     path: 'list',\n   *     component: ListComponent\n   *   },{\n   *     path: 'child',\n   *     component: ChildComponent\n   *   }]\n   * }]\n   * ```\n   *\n   * The following `go()` function navigates to the `list` route by\n   * interpreting the destination URI as relative to the activated `child`  route\n   *\n   * ```\n   *  @Component({...})\n   *  class ChildComponent {\n   *    constructor(private router: Router, private route: ActivatedRoute) {}\n   *\n   *    go() {\n   *      this.router.navigate(['../list'], { relativeTo: this.route });\n   *    }\n   *  }\n   * ```\n   *\n   * A value of `null` or `undefined` indicates that the navigation commands should be applied\n   * relative to the root.\n   */\n  relativeTo?: ActivatedRoute|null;\n\n  /**\n   * Sets query parameters to the URL.\n   *\n   * ```\n   * // Navigate to /results?page=1\n   * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n   * ```\n   */\n  queryParams?: Params|null;\n\n  /**\n   * Sets the hash fragment for the URL.\n   *\n   * ```\n   * // Navigate to /results#top\n   * this.router.navigate(['/results'], { fragment: 'top' });\n   * ```\n   */\n  fragment?: string;\n\n  /**\n   * How to handle query parameters in the router link for the next navigation.\n   * One of:\n   * * `preserve` : Preserve current parameters.\n   * * `merge` : Merge new with current parameters.\n   *\n   * The \"preserve\" option discards any new query params:\n   * ```\n   * // from /view1?page=1 to/view2?page=1\n   * this.router.navigate(['/view2'], { queryParams: { page: 2 },  queryParamsHandling: \"preserve\"\n   * });\n   * ```\n   * The \"merge\" option appends new query params to the params from the current URL:\n   * ```\n   * // from /view1?page=1 to/view2?page=1&otherKey=2\n   * this.router.navigate(['/view2'], { queryParams: { otherKey: 2 },  queryParamsHandling: \"merge\"\n   * });\n   * ```\n   * In case of a key collision between current parameters and those in the `queryParams` object,\n   * the new value is used.\n   *\n   */\n  queryParamsHandling?: QueryParamsHandling|null;\n\n  /**\n   * When true, preserves the URL fragment for the next navigation\n   *\n   * ```\n   * // Preserve fragment from /results#top to /view#top\n   * this.router.navigate(['/view'], { preserveFragment: true });\n   * ```\n   */\n  preserveFragment?: boolean;\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the navigation should be handled.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface NavigationBehaviorOptions {\n  /**\n   * When true, navigates without pushing a new state into history.\n   *\n   * ```\n   * // Navigate silently to /view\n   * this.router.navigate(['/view'], { skipLocationChange: true });\n   * ```\n   */\n  skipLocationChange?: boolean;\n\n  /**\n   * When true, navigates while replacing the current state in history.\n   *\n   * ```\n   * // Navigate to /view\n   * this.router.navigate(['/view'], { replaceUrl: true });\n   * ```\n   */\n  replaceUrl?: boolean;\n\n  /**\n   * Developer-defined state that can be passed to any navigation.\n   * Access this value through the `Navigation.extras` object\n   * returned from the [Router.getCurrentNavigation()\n   * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\n   *\n   * After a navigation completes, the router writes an object containing this\n   * value together with a `navigationId` to `history.state`.\n   * The value is written when `location.go()` or `location.replaceState()`\n   * is called before activating this route.\n   *\n   * Note that `history.state` does not pass an object equality test because\n   * the router adds the `navigationId` on each navigation.\n   *\n   */\n  state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed or interpreted.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n * @see UrlCreationOptions\n * @see NavigationBehaviorOptions\n *\n * @publicApi\n */\nexport interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {}\n\n/**\n * Error handler that is invoked when a navigation error occurs.\n *\n * If the handler returns a value, the navigation Promise is resolved with this value.\n * If the handler throws an exception, the navigation Promise is rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n  throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n    error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n  return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n  [k: string]: any,\n  // TODO(#27607): Remove `navigationId` and `ɵrouterPageId` and move to `ng` or `ɵ` namespace.\n  navigationId: number,\n  // The `ɵ` prefix is there to reduce the chance of colliding with any existing user properties on\n  // the history state.\n  ɵrouterPageId?: number,\n};\n\n/**\n * Information about a navigation operation.\n * Retrieve the most recent navigation object with the\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\n *\n * * *id* : The unique identifier of the current navigation.\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\n * This is the value before the router has parsed or applied redirects to it.\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\n * * *finalUrl* : The extracted URL after redirects have been applied.\n * This URL may not be available immediately, therefore this property can be `undefined`.\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\n * * *trigger* : Identifies how this navigation was triggered.\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n * -- 'popstate'--Triggered by a popstate event.\n * -- 'hashchange'--Triggered by a hashchange event.\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\n * navigation.\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\n * own `previousNavigation`.\n *\n * @publicApi\n */\nexport interface Navigation {\n  /**\n   * The unique identifier of the current navigation.\n   */\n  id: number;\n  /**\n   * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\n   * the value before the router has parsed or applied redirects to it.\n   */\n  initialUrl: string|UrlTree;\n  /**\n   * The initial target URL after being parsed with `UrlSerializer.extract()`.\n   */\n  extractedUrl: UrlTree;\n  /**\n   * The extracted URL after redirects have been applied.\n   * This URL may not be available immediately, therefore this property can be `undefined`.\n   * It is guaranteed to be set after the `RoutesRecognized` event fires.\n   */\n  finalUrl?: UrlTree;\n  /**\n   * Identifies how this navigation was triggered.\n   *\n   * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n   * * 'popstate'--Triggered by a popstate event.\n   * * 'hashchange'--Triggered by a hashchange event.\n   */\n  trigger: 'imperative'|'popstate'|'hashchange';\n  /**\n   * Options that controlled the strategy used for this navigation.\n   * See `NavigationExtras`.\n   */\n  extras: NavigationExtras;\n  /**\n   * The previously successful `Navigation` object. Only one previous navigation\n   * is available, therefore this previous `Navigation` object has a `null` value\n   * for its own `previousNavigation`.\n   */\n  previousNavigation: Navigation|null;\n}\n\nexport type NavigationTransition = {\n  id: number,\n  targetPageId: number,\n  currentUrlTree: UrlTree,\n  currentRawUrl: UrlTree,\n  extractedUrl: UrlTree,\n  urlAfterRedirects: UrlTree,\n  rawUrl: UrlTree,\n  extras: NavigationExtras,\n  resolve: any,\n  reject: any,\n  promise: Promise<boolean>,\n  source: NavigationTrigger,\n  restoredState: RestoredState|null,\n  currentSnapshot: RouterStateSnapshot,\n  targetSnapshot: RouterStateSnapshot|null,\n  currentRouterState: RouterState,\n  targetRouterState: RouterState|null,\n  guards: Checks,\n  guardsResult: boolean|UrlTree|null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}): Observable<void> {\n  return of(null) as any;\n}\n\n/**\n * Information related to a location change, necessary for scheduling follow-up Router navigations.\n */\ntype LocationChangeInfo = {\n  source: 'popstate'|'hashchange',\n  urlTree: UrlTree,\n  state: RestoredState|null,\n  transitionId: number\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nexport const exactMatchOptions: IsActiveMatchOptions = {\n  paths: 'exact',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'exact'\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nexport const subsetMatchOptions: IsActiveMatchOptions = {\n  paths: 'subset',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'subset'\n};\n\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Injectable()\nexport class Router {\n  /**\n   * Represents the activated `UrlTree` that the `Router` is configured to handle (through\n   * `UrlHandlingStrategy`). That is, after we find the route config tree that we're going to\n   * activate, run guards, and are just about to activate the route, we set the currentUrlTree.\n   *\n   * This should match the `browserUrlTree` when a navigation succeeds. If the\n   * `UrlHandlingStrategy.shouldProcessUrl` is `false`, only the `browserUrlTree` is updated.\n   */\n  private currentUrlTree: UrlTree;\n  /**\n   * Meant to represent the entire browser url after a successful navigation. In the life of a\n   * navigation transition:\n   * 1. The rawUrl represents the full URL that's being navigated to\n   * 2. We apply redirects, which might only apply to _part_ of the URL (due to\n   * `UrlHandlingStrategy`).\n   * 3. Right before activation (because we assume activation will succeed), we update the\n   * rawUrlTree to be a combination of the urlAfterRedirects (again, this might only apply to part\n   * of the initial url) and the rawUrl of the transition (which was the original navigation url in\n   * its full form).\n   */\n  private rawUrlTree: UrlTree;\n  /**\n   * Meant to represent the part of the browser url that the `Router` is set up to handle (via the\n   * `UrlHandlingStrategy`). This value is updated immediately after the browser url is updated (or\n   * the browser url update is skipped via `skipLocationChange`). With that, note that\n   * `browserUrlTree` _may not_ reflect the actual browser URL for two reasons:\n   *\n   * 1. `UrlHandlingStrategy` only handles part of the URL\n   * 2. `skipLocationChange` does not update the browser url.\n   *\n   * So to reiterate, `browserUrlTree` only represents the Router's internal understanding of the\n   * current route, either before guards with `urlUpdateStrategy === 'eager'` or right before\n   * activation with `'deferred'`.\n   *\n   * This should match the `currentUrlTree` when the navigation succeeds.\n   */\n  private browserUrlTree: UrlTree;\n  private readonly transitions: BehaviorSubject<NavigationTransition>;\n  private navigations: Observable<NavigationTransition>;\n  private lastSuccessfulNavigation: Navigation|null = null;\n  private currentNavigation: Navigation|null = null;\n  private disposed = false;\n\n  private locationSubscription?: SubscriptionLike;\n  /**\n   * Tracks the previously seen location change from the location subscription so we can compare\n   * the two latest to see if they are duplicates. See setUpLocationChangeListener.\n   */\n  private lastLocationChangeInfo: LocationChangeInfo|null = null;\n  private navigationId: number = 0;\n\n  /**\n   * The id of the currently active page in the router.\n   * Updated to the transition's target id on a successful navigation.\n   *\n   * This is used to track what page the router last activated. When an attempted navigation fails,\n   * the router can then use this to compute how to restore the state back to the previously active\n   * page.\n   */\n  private currentPageId: number = 0;\n  /**\n   * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n   * important for computing the target page id for new navigations because we need to ensure each\n   * page id in the browser history is 1 more than the previous entry.\n   */\n  private get browserPageId(): number|undefined {\n    return (this.location.getState() as RestoredState | null)?.ɵrouterPageId;\n  }\n  private configLoader: RouterConfigLoader;\n  private ngModule: NgModuleRef<any>;\n  private console: Console;\n  private isNgZoneEnabled: boolean = false;\n\n  /**\n   * An event stream for routing events in this NgModule.\n   */\n  public readonly events: Observable<Event> = new Subject<Event>();\n  /**\n   * The current state of routing in this NgModule.\n   */\n  public readonly routerState: RouterState;\n\n  /**\n   * A handler for navigation errors in this NgModule.\n   */\n  errorHandler: ErrorHandler = defaultErrorHandler;\n\n  /**\n   * A handler for errors thrown by `Router.parseUrl(url)`\n   * when `url` contains an invalid character.\n   * The most common case is a `%` sign\n   * that's not encoded and is not part of a percent encoded sequence.\n   */\n  malformedUriErrorHandler:\n      (error: URIError, urlSerializer: UrlSerializer,\n       url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n  /**\n   * True if at least one navigation event has occurred,\n   * false otherwise.\n   */\n  navigated: boolean = false;\n  private lastSuccessfulId: number = -1;\n\n  /**\n   * Hooks that enable you to pause navigation,\n   * either before or after the preactivation phase.\n   * Used by `RouterModule`.\n   *\n   * @internal\n   */\n  hooks: {\n    beforePreactivation: RouterHook,\n    afterPreactivation: RouterHook\n  } = {beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook};\n\n  /**\n   * A strategy for extracting and merging URLs.\n   * Used for AngularJS to Angular migrations.\n   */\n  urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n  /**\n   * A strategy for re-using routes.\n   */\n  routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n  /**\n   * How to handle a navigation request to the current URL. One of:\n   *\n   * - `'ignore'` :  The router ignores the request.\n   * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\n   *\n   * Note that this only configures whether the Route reprocesses the URL and triggers related\n   * action and events like redirects, guards, and resolvers. By default, the router re-uses a\n   * component instance when it re-navigates to the same component type without visiting a different\n   * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload\n   * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`\n   * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.\n   */\n  onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n  /**\n   * How to merge parameters, data, and resolved data from parent to child\n   * routes. One of:\n   *\n   * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n   * for path-less or component-less routes.\n   * - `'always'` : Inherit parent parameters, data, and resolved data\n   * for all child routes.\n   */\n  paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n  /**\n   * Determines when the router updates the browser URL.\n   * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n   * Set to `'eager'` to update the browser URL at the beginning of navigation.\n   * You can choose to update early so that, if navigation fails,\n   * you can show an error message with the URL that failed.\n   */\n  urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * @see `RouterModule`\n   */\n  relativeLinkResolution: 'legacy'|'corrected' = 'corrected';\n\n  /**\n   * Configures how the Router attempts to restore state when a navigation is cancelled.\n   *\n   * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n   * router before the navigation started.\n   *\n   * 'computed' - Will always return to the same state that corresponds to the actual Angular route\n   * when the navigation gets cancelled right after triggering a `popstate` event.\n   *\n   * The default value is `replace`\n   *\n   * @internal\n   */\n  // TODO(atscott): Determine how/when/if to make this public API\n  // This shouldn’t be an option at all but may need to be in order to allow migration without a\n  // breaking change. We need to determine if it should be made into public api (or if we forgo\n  // the option and release as a breaking change bug fix in a major version).\n  canceledNavigationResolution: 'replace'|'computed' = 'replace';\n\n  /**\n   * Creates the router service.\n   */\n  // TODO: vsavkin make internal after the final is out.\n  constructor(\n      private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n      private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n      loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n    const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n    const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.ngModule = injector.get(NgModuleRef);\n    this.console = injector.get(Console);\n    const ngZone = injector.get(NgZone);\n    this.isNgZoneEnabled = ngZone instanceof NgZone && NgZone.isInAngularZone();\n\n    this.resetConfig(config);\n    this.currentUrlTree = createEmptyUrlTree();\n    this.rawUrlTree = this.currentUrlTree;\n    this.browserUrlTree = this.currentUrlTree;\n\n    this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n    this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n    this.transitions = new BehaviorSubject<NavigationTransition>({\n      id: 0,\n      targetPageId: 0,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.currentUrlTree,\n      extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      rawUrl: this.currentUrlTree,\n      extras: {},\n      resolve: null,\n      reject: null,\n      promise: Promise.resolve(true),\n      source: 'imperative',\n      restoredState: null,\n      currentSnapshot: this.routerState.snapshot,\n      targetSnapshot: null,\n      currentRouterState: this.routerState,\n      targetRouterState: null,\n      guards: {canActivateChecks: [], canDeactivateChecks: []},\n      guardsResult: null,\n    });\n    this.navigations = this.setupNavigations(this.transitions);\n\n    this.processNavigations();\n  }\n\n  private setupNavigations(transitions: Observable<NavigationTransition>):\n      Observable<NavigationTransition> {\n    const eventsSubject = (this.events as Subject<Event>);\n    return transitions.pipe(\n               filter(t => t.id !== 0),\n\n               // Extract URL\n               map(t =>\n                       ({...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)} as\n                        NavigationTransition)),\n\n               // Using switchMap so we cancel executing navigations when a new one comes in\n               switchMap(t => {\n                 let completed = false;\n                 let errored = false;\n                 return of(t).pipe(\n                     // Store the Navigation object\n                     tap(t => {\n                       this.currentNavigation = {\n                         id: t.id,\n                         initialUrl: t.currentRawUrl,\n                         extractedUrl: t.extractedUrl,\n                         trigger: t.source,\n                         extras: t.extras,\n                         previousNavigation: this.lastSuccessfulNavigation ?\n                             {...this.lastSuccessfulNavigation, previousNavigation: null} :\n                             null\n                       };\n                     }),\n                     switchMap(t => {\n                       const browserUrlTree = this.browserUrlTree.toString();\n                       const urlTransition = !this.navigated ||\n                           t.extractedUrl.toString() !== browserUrlTree ||\n                           // Navigations which succeed or ones which fail and are cleaned up\n                           // correctly should result in `browserUrlTree` and `currentUrlTree`\n                           // matching. If this is not the case, assume something went wrong and try\n                           // processing the URL again.\n                           browserUrlTree !== this.currentUrlTree.toString();\n                       const processCurrentUrl =\n                           (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n                           this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n\n                       if (processCurrentUrl) {\n                         // If the source of the navigation is from a browser event, the URL is\n                         // already updated. We already need to sync the internal state.\n                         if (isBrowserTriggeredNavigation(t.source)) {\n                           this.browserUrlTree = t.extractedUrl;\n                         }\n                         return of(t).pipe(\n                             // Fire NavigationStart event\n                             switchMap(t => {\n                               const transition = this.transitions.getValue();\n                               eventsSubject.next(new NavigationStart(\n                                   t.id, this.serializeUrl(t.extractedUrl), t.source,\n                                   t.restoredState));\n                               if (transition !== this.transitions.getValue()) {\n                                 return EMPTY;\n                               }\n\n                               // This delay is required to match old behavior that forced\n                               // navigation to always be async\n                               return Promise.resolve(t);\n                             }),\n\n                             // ApplyRedirects\n                             applyRedirects(\n                                 this.ngModule.injector, this.configLoader, this.urlSerializer,\n                                 this.config),\n\n                             // Update the currentNavigation\n                             tap(t => {\n                               this.currentNavigation = {\n                                 ...this.currentNavigation!,\n                                 finalUrl: t.urlAfterRedirects\n                               };\n                             }),\n\n                             // Recognize\n                             recognize(\n                                 this.rootComponentType, this.config,\n                                 (url) => this.serializeUrl(url), this.paramsInheritanceStrategy,\n                                 this.relativeLinkResolution),\n\n                             // Update URL if in `eager` update mode\n                             tap(t => {\n                               if (this.urlUpdateStrategy === 'eager') {\n                                 if (!t.extras.skipLocationChange) {\n                                   this.setBrowserUrl(t.urlAfterRedirects, t);\n                                   // TODO(atscott): The above line is incorrect. It sets the url to\n                                   // only the part that is handled by the router. It should merge\n                                   // that with the rawUrl so the url includes segments not handled\n                                   // by the router:\n                                   //  const rawUrl = this.urlHandlingStrategy.merge(\n                                   //      t.urlAfterRedirects, t.rawUrl);\n                                   //  this.setBrowserUrl(rawUrl, t);\n                                 }\n                                 this.browserUrlTree = t.urlAfterRedirects;\n                               }\n\n                               // Fire RoutesRecognized\n                               const routesRecognized = new RoutesRecognized(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               eventsSubject.next(routesRecognized);\n                             }));\n                       } else {\n                         const processPreviousUrl = urlTransition && this.rawUrlTree &&\n                             this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n                         /* When the current URL shouldn't be processed, but the previous one was,\n                          * we handle this \"error condition\" by navigating to the previously\n                          * successful URL, but leaving the URL intact.*/\n                         if (processPreviousUrl) {\n                           const {id, extractedUrl, source, restoredState, extras} = t;\n                           const navStart = new NavigationStart(\n                               id, this.serializeUrl(extractedUrl), source, restoredState);\n                           eventsSubject.next(navStart);\n                           const targetSnapshot =\n                               createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n                           return of({\n                             ...t,\n                             targetSnapshot,\n                             urlAfterRedirects: extractedUrl,\n                             extras: {...extras, skipLocationChange: false, replaceUrl: false},\n                           });\n                         } else {\n                           /* When neither the current or previous URL can be processed, do nothing\n                            * other than update router's internal reference to the current \"settled\"\n                            * URL. This way the next navigation will be coming from the current URL\n                            * in the browser.\n                            */\n                           this.rawUrlTree = t.rawUrl;\n                           this.browserUrlTree = t.urlAfterRedirects;\n                           t.resolve(null);\n                           return EMPTY;\n                         }\n                       }\n                     }),\n\n                     // Before Preactivation\n                     switchTap(t => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.beforePreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     // --- GUARDS ---\n                     tap(t => {\n                       const guardsStart = new GuardsCheckStart(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                       this.triggerEvent(guardsStart);\n                     }),\n\n                     map(t => ({\n                           ...t,\n                           guards: getAllRouteGuards(\n                               t.targetSnapshot!, t.currentSnapshot, this.rootContexts)\n                         })),\n\n                     checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n                     tap(t => {\n                       if (isUrlTree(t.guardsResult)) {\n                         const error: Error&{url?: UrlTree} = navigationCancelingError(\n                             `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n                         error.url = t.guardsResult;\n                         throw error;\n                       }\n\n                       const guardsEnd = new GuardsCheckEnd(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!,\n                           !!t.guardsResult);\n                       this.triggerEvent(guardsEnd);\n                     }),\n\n                     filter(t => {\n                       if (!t.guardsResult) {\n                         this.restoreHistory(t);\n                         this.cancelNavigationTransition(t, '');\n                         return false;\n                       }\n                       return true;\n                     }),\n\n                     // --- RESOLVE ---\n                     switchTap(t => {\n                       if (t.guards.canActivateChecks.length) {\n                         return of(t).pipe(\n                             tap(t => {\n                               const resolveStart = new ResolveStart(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveStart);\n                             }),\n                             switchMap(t => {\n                               let dataResolved = false;\n                               return of(t).pipe(\n                                   resolveData(\n                                       this.paramsInheritanceStrategy, this.ngModule.injector),\n                                   tap({\n                                     next: () => dataResolved = true,\n                                     complete: () => {\n                                       if (!dataResolved) {\n                                         this.restoreHistory(t);\n                                         this.cancelNavigationTransition(\n                                             t,\n                                             `At least one route resolver didn't emit any value.`);\n                                       }\n                                     }\n                                   }),\n                               );\n                             }),\n                             tap(t => {\n                               const resolveEnd = new ResolveEnd(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveEnd);\n                             }));\n                       }\n                       return undefined;\n                     }),\n\n                     // --- AFTER PREACTIVATION ---\n                     switchTap((t: NavigationTransition) => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.afterPreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     map((t: NavigationTransition) => {\n                       const targetRouterState = createRouterState(\n                           this.routeReuseStrategy, t.targetSnapshot!, t.currentRouterState);\n                       return ({...t, targetRouterState});\n                     }),\n\n                     /* Once here, we are about to activate syncronously. The assumption is this\n                        will succeed, and user code may read from the Router service. Therefore\n                        before activation, we need to update router properties storing the current\n                        URL and the RouterState, as well as updated the browser URL. All this should\n                        happen *before* activating. */\n                     tap((t: NavigationTransition) => {\n                       this.currentUrlTree = t.urlAfterRedirects;\n                       this.rawUrlTree =\n                           this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n\n                       (this as {routerState: RouterState}).routerState = t.targetRouterState!;\n\n                       if (this.urlUpdateStrategy === 'deferred') {\n                         if (!t.extras.skipLocationChange) {\n                           this.setBrowserUrl(this.rawUrlTree, t);\n                         }\n                         this.browserUrlTree = t.urlAfterRedirects;\n                       }\n                     }),\n\n                     activateRoutes(\n                         this.rootContexts, this.routeReuseStrategy,\n                         (evt: Event) => this.triggerEvent(evt)),\n\n                     tap({\n                       next() {\n                         completed = true;\n                       },\n                       complete() {\n                         completed = true;\n                       }\n                     }),\n                     finalize(() => {\n                       /* When the navigation stream finishes either through error or success, we\n                        * set the `completed` or `errored` flag. However, there are some situations\n                        * where we could get here without either of those being set. For instance, a\n                        * redirect during NavigationStart. Therefore, this is a catch-all to make\n                        * sure the NavigationCancel\n                        * event is fired when a navigation gets cancelled but not caught by other\n                        * means. */\n                       if (!completed && !errored) {\n                         const cancelationReason = `Navigation ID ${\n                             t.id} is not equal to the current navigation id ${this.navigationId}`;\n                         if (this.canceledNavigationResolution === 'replace') {\n                           // Must reset to current URL tree here to ensure history.state is set. On\n                           // a fresh page load, if a new navigation comes in before a successful\n                           // navigation completes, there will be nothing in\n                           // history.state.navigationId. This can cause sync problems with\n                           // AngularJS sync code which looks for a value here in order to determine\n                           // whether or not to handle a given popstate event or to leave it to the\n                           // Angular router.\n                           this.restoreHistory(t);\n                           this.cancelNavigationTransition(t, cancelationReason);\n                         } else {\n                           // We cannot trigger a `location.historyGo` if the\n                           // cancellation was due to a new navigation before the previous could\n                           // complete. This is because `location.historyGo` triggers a `popstate`\n                           // which would also trigger another navigation. Instead, treat this as a\n                           // redirect and do not reset the state.\n                           this.cancelNavigationTransition(t, cancelationReason);\n                           // TODO(atscott): The same problem happens here with a fresh page load\n                           // and a new navigation before that completes where we won't set a page\n                           // id.\n                         }\n                       }\n                       // Only clear current navigation if it is still set to the one that\n                       // finalized.\n                       if (this.currentNavigation?.id === t.id) {\n                         this.currentNavigation = null;\n                       }\n                     }),\n                     catchError((e) => {\n                       // TODO(atscott): The NavigationTransition `t` used here does not accurately\n                       // reflect the current state of the whole transition because some operations\n                       // return a new object rather than modifying the one in the outermost\n                       // `switchMap`.\n                       //  The fix can likely be to:\n                       //  1. Rename the outer `t` variable so it's not shadowed all the time and\n                       //  confusing\n                       //  2. Keep reassigning to the outer variable after each stage to ensure it\n                       //  gets updated. Or change the implementations to not return a copy.\n                       // Not changed yet because it affects existing code and would need to be\n                       // tested more thoroughly.\n                       errored = true;\n                       /* This error type is issued during Redirect, and is handled as a\n                        * cancellation rather than an error. */\n                       if (isNavigationCancelingError(e)) {\n                         const redirecting = isUrlTree(e.url);\n                         if (!redirecting) {\n                           // Set property only if we're not redirecting. If we landed on a page and\n                           // redirect to `/` route, the new navigation is going to see the `/`\n                           // isn't a change from the default currentUrlTree and won't navigate.\n                           // This is only applicable with initial navigation, so setting\n                           // `navigated` only when not redirecting resolves this scenario.\n                           this.navigated = true;\n                           this.restoreHistory(t, true);\n                         }\n                         const navCancel = new NavigationCancel(\n                             t.id, this.serializeUrl(t.extractedUrl), e.message);\n                         eventsSubject.next(navCancel);\n\n                         // When redirecting, we need to delay resolving the navigation\n                         // promise and push it to the redirect navigation\n                         if (!redirecting) {\n                           t.resolve(false);\n                         } else {\n                           // setTimeout is required so this navigation finishes with\n                           // the return EMPTY below. If it isn't allowed to finish\n                           // processing, there can be multiple navigations to the same\n                           // URL.\n                           setTimeout(() => {\n                             const mergedTree =\n                                 this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);\n                             const extras = {\n                               skipLocationChange: t.extras.skipLocationChange,\n                               // The URL is already updated at this point if we have 'eager' URL\n                               // updates or if the navigation was triggered by the browser (back\n                               // button, URL bar, etc). We want to replace that item in history if\n                               // the navigation is rejected.\n                               replaceUrl: this.urlUpdateStrategy === 'eager' ||\n                                   isBrowserTriggeredNavigation(t.source)\n                             };\n\n                             this.scheduleNavigation(\n                                 mergedTree, 'imperative', null, extras,\n                                 {resolve: t.resolve, reject: t.reject, promise: t.promise});\n                           }, 0);\n                         }\n\n                         /* All other errors should reset to the router's internal URL reference to\n                          * the pre-error state. */\n                       } else {\n                         this.restoreHistory(t, true);\n                         const navError =\n                             new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n                         eventsSubject.next(navError);\n                         try {\n                           t.resolve(this.errorHandler(e));\n                         } catch (ee) {\n                           t.reject(ee);\n                         }\n                       }\n                       return EMPTY;\n                     }));\n                 // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n               })) as any as Observable<NavigationTransition>;\n  }\n\n  /**\n   * @internal\n   * TODO: this should be removed once the constructor of the router made internal\n   */\n  resetRootComponentType(rootComponentType: Type<any>): void {\n    this.rootComponentType = rootComponentType;\n    // TODO: vsavkin router 4.0 should make the root component set to null\n    // this will simplify the lifecycle of the router.\n    this.routerState.root.component = this.rootComponentType;\n  }\n\n  private getTransition(): NavigationTransition {\n    const transition = this.transitions.value;\n    // TODO(atscott): This comment doesn't make it clear why this value needs to be set. In the case\n    // described below (where we don't handle previous or current url), the `browserUrlTree` is set\n    // to the `urlAfterRedirects` value. However, these values *are already the same* because of the\n    // line below. So it seems that we should be able to remove the line below and the line where\n    // `browserUrlTree` is updated when we aren't handling any part of the navigation url.\n    // Run TGP to confirm that this can be done.\n\n    // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n    // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n    // processing the previous URL.\n    transition.urlAfterRedirects = this.browserUrlTree;\n    return transition;\n  }\n\n  private setTransition(t: Partial<NavigationTransition>): void {\n    this.transitions.next({...this.getTransition(), ...t});\n  }\n\n  /**\n   * Sets up the location change listener and performs the initial navigation.\n   */\n  initialNavigation(): void {\n    this.setUpLocationChangeListener();\n    if (this.navigationId === 0) {\n      this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n    }\n  }\n\n  /**\n   * Sets up the location change listener. This listener detects navigations triggered from outside\n   * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n   * navigation so that the correct events, guards, etc. are triggered.\n   */\n  setUpLocationChangeListener(): void {\n    // Don't need to use Zone.wrap any more, because zone.js\n    // already patch onPopState, so location change callback will\n    // run into ngZone\n    if (!this.locationSubscription) {\n      this.locationSubscription = this.location.subscribe(event => {\n        const currentChange = this.extractLocationChangeInfoFromEvent(event);\n        // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n        // hybrid apps.\n        if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) {\n          setTimeout(() => {\n            const {source, state, urlTree} = currentChange;\n            const extras: NavigationExtras = {replaceUrl: true};\n            if (state) {\n              const stateCopy = {...state} as Partial<RestoredState>;\n              delete stateCopy.navigationId;\n              delete stateCopy.ɵrouterPageId;\n              if (Object.keys(stateCopy).length !== 0) {\n                extras.state = stateCopy;\n              }\n            }\n            this.scheduleNavigation(urlTree, source, state, extras);\n          }, 0);\n        }\n        this.lastLocationChangeInfo = currentChange;\n      });\n    }\n  }\n\n  /** Extracts router-related information from a `PopStateEvent`. */\n  private extractLocationChangeInfoFromEvent(change: PopStateEvent): LocationChangeInfo {\n    return {\n      source: change['type'] === 'popstate' ? 'popstate' : 'hashchange',\n      urlTree: this.parseUrl(change['url']!),\n      // Navigations coming from Angular router have a navigationId state\n      // property. When this exists, restore the state.\n      state: change.state?.navigationId ? change.state : null,\n      transitionId: this.getTransition().id\n    } as const;\n  }\n\n  /**\n   * Determines whether two events triggered by the Location subscription are due to the same\n   * navigation. The location subscription can fire two events (popstate and hashchange) for a\n   * single navigation. The second one should be ignored, that is, we should not schedule another\n   * navigation in the Router.\n   */\n  private shouldScheduleNavigation(previous: LocationChangeInfo|null, current: LocationChangeInfo):\n      boolean {\n    if (!previous) return true;\n\n    const sameDestination = current.urlTree.toString() === previous.urlTree.toString();\n    const eventsOccurredAtSameTime = current.transitionId === previous.transitionId;\n    if (!eventsOccurredAtSameTime || !sameDestination) {\n      return true;\n    }\n\n    if ((current.source === 'hashchange' && previous.source === 'popstate') ||\n        (current.source === 'popstate' && previous.source === 'hashchange')) {\n      return false;\n    }\n\n    return true;\n  }\n\n  /** The current URL. */\n  get url(): string {\n    return this.serializeUrl(this.currentUrlTree);\n  }\n\n  /**\n   * Returns the current `Navigation` object when the router is navigating,\n   * and `null` when idle.\n   */\n  getCurrentNavigation(): Navigation|null {\n    return this.currentNavigation;\n  }\n\n  /** @internal */\n  triggerEvent(event: Event): void {\n    (this.events as Subject<Event>).next(event);\n  }\n\n  /**\n   * Resets the route configuration used for navigation and generating links.\n   *\n   * @param config The route array for the new configuration.\n   *\n   * @usageNotes\n   *\n   * ```\n   * router.resetConfig([\n   *  { path: 'team/:id', component: TeamCmp, children: [\n   *    { path: 'simple', component: SimpleCmp },\n   *    { path: 'user/:name', component: UserCmp }\n   *  ]}\n   * ]);\n   * ```\n   */\n  resetConfig(config: Routes): void {\n    validateConfig(config);\n    this.config = config.map(standardizeConfig);\n    this.navigated = false;\n    this.lastSuccessfulId = -1;\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.dispose();\n  }\n\n  /** Disposes of the router. */\n  dispose(): void {\n    this.transitions.complete();\n    if (this.locationSubscription) {\n      this.locationSubscription.unsubscribe();\n      this.locationSubscription = undefined;\n    }\n    this.disposed = true;\n  }\n\n  /**\n   * Appends URL segments to the current URL tree to create a new URL tree.\n   *\n   * @param commands An array of URL fragments with which to construct the new URL tree.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\n   * property of the options object, if supplied.\n   * @param navigationExtras Options that control the navigation strategy.\n   * @returns The new URL tree.\n   *\n   * @usageNotes\n   *\n   * ```\n   * // create /team/33/user/11\n   * router.createUrlTree(['/team', 33, 'user', 11]);\n   *\n   * // create /team/33;expand=true/user/11\n   * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n   *\n   * // you can collapse static segments like this (this works only with the first passed-in value):\n   * router.createUrlTree(['/team/33/user', userId]);\n   *\n   * // If the first segment can contain slashes, and you do not want the router to split it,\n   * // you can do the following:\n   * router.createUrlTree([{segmentPath: '/one/two'}]);\n   *\n   * // create /team/33/(user/11//right:chat)\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n   *\n   * // remove the right secondary node\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n   *\n   * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n   *\n   * // navigate to /team/33/user/11/details\n   * router.createUrlTree(['details'], {relativeTo: route});\n   *\n   * // navigate to /team/33/user/22\n   * router.createUrlTree(['../22'], {relativeTo: route});\n   *\n   * // navigate to /team/44/user/22\n   * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n   *\n   * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n   * tree should be created relative to the root.\n   * ```\n   */\n  createUrlTree(commands: any[], navigationExtras: UrlCreationOptions = {}): UrlTree {\n    const {relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment} =\n        navigationExtras;\n    const a = relativeTo || this.routerState.root;\n    const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n    let q: Params|null = null;\n    switch (queryParamsHandling) {\n      case 'merge':\n        q = {...this.currentUrlTree.queryParams, ...queryParams};\n        break;\n      case 'preserve':\n        q = this.currentUrlTree.queryParams;\n        break;\n      default:\n        q = queryParams || null;\n    }\n    if (q !== null) {\n      q = this.removeEmptyProps(q);\n    }\n    return createUrlTree(a, this.currentUrlTree, commands, q, f ?? null);\n  }\n\n  /**\n   * Navigates to a view using an absolute route path.\n   *\n   * @param url An absolute path for a defined route. The function does not apply any delta to the\n   *     current URL.\n   * @param extras An object containing properties that modify the navigation strategy.\n   *\n   * @returns A Promise that resolves to 'true' when navigation succeeds,\n   * to 'false' when navigation fails, or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to an absolute path.\n   *\n   * ```\n   * router.navigateByUrl(\"/team/33/user/11\");\n   *\n   * // Navigate without updating the URL\n   * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigateByUrl(url: string|UrlTree, extras: NavigationBehaviorOptions = {\n    skipLocationChange: false\n  }): Promise<boolean> {\n    if (typeof ngDevMode === 'undefined' ||\n        ngDevMode && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n      this.console.warn(\n          `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n    }\n\n    const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n    const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n    return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n  }\n\n  /**\n   * Navigate based on the provided array of commands and a starting point.\n   * If no starting route is provided, the navigation is absolute.\n   *\n   * @param commands An array of URL fragments with which to construct the target URL.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\n   * of the options object, if supplied.\n   * @param extras An options object that determines how the URL should be constructed or\n   *     interpreted.\n   *\n   * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\n   *     fails,\n   * or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to a dynamic route path relative to the current URL.\n   *\n   * ```\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n   *\n   * // Navigate without updating the URL, overriding the default behavior\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    validateCommands(commands);\n    return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n  }\n\n  /** Serializes a `UrlTree` into a string */\n  serializeUrl(url: UrlTree): string {\n    return this.urlSerializer.serialize(url);\n  }\n\n  /** Parses a string into a `UrlTree` */\n  parseUrl(url: string): UrlTree {\n    let urlTree: UrlTree;\n    try {\n      urlTree = this.urlSerializer.parse(url);\n    } catch (e) {\n      urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n    }\n    return urlTree;\n  }\n\n  /**\n   * Returns whether the url is activated.\n   *\n   * @deprecated\n   * Use `IsActiveMatchOptions` instead.\n   *\n   * - The equivalent `IsActiveMatchOptions` for `true` is\n   * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.\n   * - The equivalent for `false` is\n   * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.\n   */\n  isActive(url: string|UrlTree, exact: boolean): boolean;\n  /**\n   * Returns whether the url is activated.\n   */\n  isActive(url: string|UrlTree, matchOptions: IsActiveMatchOptions): boolean;\n  /** @internal */\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean;\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean {\n    let options: IsActiveMatchOptions;\n    if (matchOptions === true) {\n      options = {...exactMatchOptions};\n    } else if (matchOptions === false) {\n      options = {...subsetMatchOptions};\n    } else {\n      options = matchOptions;\n    }\n    if (isUrlTree(url)) {\n      return containsTree(this.currentUrlTree, url, options);\n    }\n\n    const urlTree = this.parseUrl(url);\n    return containsTree(this.currentUrlTree, urlTree, options);\n  }\n\n  private removeEmptyProps(params: Params): Params {\n    return Object.keys(params).reduce((result: Params, key: string) => {\n      const value: any = params[key];\n      if (value !== null && value !== undefined) {\n        result[key] = value;\n      }\n      return result;\n    }, {});\n  }\n\n  private processNavigations(): void {\n    this.navigations.subscribe(\n        t => {\n          this.navigated = true;\n          this.lastSuccessfulId = t.id;\n          this.currentPageId = t.targetPageId;\n          (this.events as Subject<Event>)\n              .next(new NavigationEnd(\n                  t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n          this.lastSuccessfulNavigation = this.currentNavigation;\n          t.resolve(true);\n        },\n        e => {\n          this.console.warn(`Unhandled Navigation Error: ${e}`);\n        });\n  }\n\n  private scheduleNavigation(\n      rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n      extras: NavigationExtras,\n      priorPromise?: {resolve: any, reject: any, promise: Promise<boolean>}): Promise<boolean> {\n    if (this.disposed) {\n      return Promise.resolve(false);\n    }\n\n    // * Imperative navigations (router.navigate) might trigger additional navigations to the same\n    //   URL via a popstate event and the locationChangeListener. We should skip these duplicate\n    //   navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router\n    //   states.\n    // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If\n    //   the user follows that with a navigation using the back/forward button or manual URL change,\n    //   the destination may be the same as the previous imperative attempt. We should not skip\n    //   these navigations because it's a separate case from the one above -- it's not a duplicate\n    //   navigation.\n    const lastNavigation = this.getTransition();\n    // We don't want to skip duplicate successful navs if they're imperative because\n    // onSameUrlNavigation could be 'reload' (so the duplicate is intended).\n    const browserNavPrecededByRouterNav = isBrowserTriggeredNavigation(source) && lastNavigation &&\n        !isBrowserTriggeredNavigation(lastNavigation.source);\n    const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id;\n    // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison.\n    // However, if it failed, we should compare to the final result (urlAfterRedirects).\n    const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ?\n        lastNavigation.rawUrl :\n        lastNavigation.urlAfterRedirects;\n    const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();\n    if (browserNavPrecededByRouterNav && duplicateNav) {\n      return Promise.resolve(true);  // return value is not used\n    }\n\n    let resolve: any;\n    let reject: any;\n    let promise: Promise<boolean>;\n    if (priorPromise) {\n      resolve = priorPromise.resolve;\n      reject = priorPromise.reject;\n      promise = priorPromise.promise;\n\n    } else {\n      promise = new Promise<boolean>((res, rej) => {\n        resolve = res;\n        reject = rej;\n      });\n    }\n\n    const id = ++this.navigationId;\n    let targetPageId: number;\n    if (this.canceledNavigationResolution === 'computed') {\n      const isInitialPage = this.currentPageId === 0;\n      if (isInitialPage) {\n        restoredState = this.location.getState() as RestoredState | null;\n      }\n      // If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of\n      // `ɵrouterPageId`. This is the case for something like a page refresh where we assign the\n      // target id to the previously set value for that page.\n      if (restoredState && restoredState.ɵrouterPageId) {\n        targetPageId = restoredState.ɵrouterPageId;\n      } else {\n        // If we're replacing the URL or doing a silent navigation, we do not want to increment the\n        // page id because we aren't pushing a new entry to history.\n        if (extras.replaceUrl || extras.skipLocationChange) {\n          targetPageId = this.browserPageId ?? 0;\n        } else {\n          targetPageId = (this.browserPageId ?? 0) + 1;\n        }\n      }\n    } else {\n      // This is unused when `canceledNavigationResolution` is not computed.\n      targetPageId = 0;\n    }\n\n    this.setTransition({\n      id,\n      targetPageId,\n      source,\n      restoredState,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.rawUrlTree,\n      rawUrl,\n      extras,\n      resolve,\n      reject,\n      promise,\n      currentSnapshot: this.routerState.snapshot,\n      currentRouterState: this.routerState\n    });\n\n    // Make sure that the error is propagated even though `processNavigations` catch\n    // handler does not rethrow\n    return promise.catch((e: any) => {\n      return Promise.reject(e);\n    });\n  }\n\n  private setBrowserUrl(url: UrlTree, t: NavigationTransition) {\n    const path = this.urlSerializer.serialize(url);\n    const state = {...t.extras.state, ...this.generateNgRouterState(t.id, t.targetPageId)};\n    if (this.location.isCurrentPathEqualTo(path) || !!t.extras.replaceUrl) {\n      this.location.replaceState(path, '', state);\n    } else {\n      this.location.go(path, '', state);\n    }\n  }\n\n  /**\n   * Performs the necessary rollback action to restore the browser URL to the\n   * state before the transition.\n   */\n  private restoreHistory(t: NavigationTransition, restoringFromCaughtError = false) {\n    if (this.canceledNavigationResolution === 'computed') {\n      const targetPagePosition = this.currentPageId - t.targetPageId;\n      // The navigator change the location before triggered the browser event,\n      // so we need to go back to the current url if the navigation is canceled.\n      // Also, when navigation gets cancelled while using url update strategy eager, then we need to\n      // go back. Because, when `urlUpdateSrategy` is `eager`; `setBrowserUrl` method is called\n      // before any verification.\n      const browserUrlUpdateOccurred =\n          (t.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n           this.currentUrlTree === this.currentNavigation?.finalUrl);\n      if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n        this.location.historyGo(targetPagePosition);\n      } else if (\n          this.currentUrlTree === this.currentNavigation?.finalUrl && targetPagePosition === 0) {\n        // We got to the activation stage (where currentUrlTree is set to the navigation's\n        // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n        // We still need to reset the router state back to what it was when the navigation started.\n        this.resetState(t);\n        // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.\n        // Investigate if this can be done by running TGP.\n        this.browserUrlTree = t.currentUrlTree;\n        this.resetUrlToCurrentUrlTree();\n      } else {\n        // The browser URL and router state was not updated before the navigation cancelled so\n        // there's no restoration needed.\n      }\n    } else if (this.canceledNavigationResolution === 'replace') {\n      // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n      // for `deferred` navigations that haven't change the internal state yet because guards\n      // reject. For 'eager' navigations, it seems like we also really should reset the state\n      // because the navigation was cancelled. Investigate if this can be done by running TGP.\n      if (restoringFromCaughtError) {\n        this.resetState(t);\n      }\n      this.resetUrlToCurrentUrlTree();\n    }\n  }\n\n  private resetState(t: NavigationTransition): void {\n    (this as {routerState: RouterState}).routerState = t.currentRouterState;\n    this.currentUrlTree = t.currentUrlTree;\n    this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n  }\n\n  private resetUrlToCurrentUrlTree(): void {\n    this.location.replaceState(\n        this.urlSerializer.serialize(this.rawUrlTree), '',\n        this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n  }\n\n  private cancelNavigationTransition(t: NavigationTransition, reason: string) {\n    const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), reason);\n    this.triggerEvent(navCancel);\n    t.resolve(false);\n  }\n\n  private generateNgRouterState(navigationId: number, routerPageId?: number) {\n    if (this.canceledNavigationResolution === 'computed') {\n      return {navigationId, ɵrouterPageId: routerPageId};\n    }\n    return {navigationId};\n  }\n}\n\nfunction validateCommands(commands: string[]): void {\n  for (let i = 0; i < commands.length; i++) {\n    const cmd = commands[i];\n    if (cmd == null) {\n      throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n    }\n  }\n}\n\nfunction isBrowserTriggeredNavigation(source: 'imperative'|'popstate'|'hashchange') {\n  return source !== 'imperative';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {Params} from '../shared';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segements.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink implements OnChanges {\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private preserve!: boolean;\n\n  /** @internal */\n  onChanges = new Subject<RouterLink>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n    if (tabIndex == null) {\n      renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges) {\n    // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n    // to the RouterLinks it's tracking.\n    this.onChanges.next(this);\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  @HostListener('click')\n  onClick(): boolean {\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state,\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return true;\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @HostBinding('attr.target') @Input() target!: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private subscription: Subscription;\n  // TODO(issue/24571): remove '!'.\n  private preserve!: boolean;\n\n  // the url displayed on the anchor element.\n  // TODO(issue/24571): remove '!'.\n  @HostBinding() href!: string;\n\n  /** @internal */\n  onChanges = new Subject<RouterLinkWithHref>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      private locationStrategy: LocationStrategy) {\n    this.subscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.updateTargetUrlAndHref();\n      }\n    });\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): any {\n    this.updateTargetUrlAndHref();\n    this.onChanges.next(this);\n  }\n  /** @nodoc */\n  ngOnDestroy(): any {\n    this.subscription.unsubscribe();\n  }\n\n  /** @nodoc */\n  @HostListener(\n      'click',\n      ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'])\n  onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean):\n      boolean {\n    if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n      return true;\n    }\n\n    if (typeof this.target === 'string' && this.target != '_self') {\n      return true;\n    }\n\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return false;\n  }\n\n  private updateTargetUrlAndHref(): void {\n    this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\nfunction attrBoolValue(s: any): boolean {\n  return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, Optional, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {from, of, Subscription} from 'rxjs';\nimport {mergeAll} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {IsActiveMatchOptions} from '../url_tree';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLinkActive]',\n  exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n  @ContentChildren(RouterLink, {descendants: true}) links!: QueryList<RouterLink>;\n  @ContentChildren(RouterLinkWithHref, {descendants: true})\n  linksWithHrefs!: QueryList<RouterLinkWithHref>;\n\n  private classes: string[] = [];\n  private routerEventsSubscription: Subscription;\n  private linkInputChangesSubscription?: Subscription;\n  public readonly isActive: boolean = false;\n\n  /**\n   * Options to configure how to determine if the router link is active.\n   *\n   * These options are passed to the `Router.isActive()` function.\n   *\n   * @see Router.isActive\n   */\n  @Input() routerLinkActiveOptions: {exact: boolean}|IsActiveMatchOptions = {exact: false};\n\n\n  constructor(\n      private router: Router, private element: ElementRef, private renderer: Renderer2,\n      private readonly cdr: ChangeDetectorRef, @Optional() private link?: RouterLink,\n      @Optional() private linkWithHref?: RouterLinkWithHref) {\n    this.routerEventsSubscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.update();\n      }\n    });\n  }\n\n  /** @nodoc */\n  ngAfterContentInit(): void {\n    // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n    of(this.links.changes, this.linksWithHrefs.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n      this.update();\n      this.subscribeToEachLinkOnChanges();\n    });\n  }\n\n  private subscribeToEachLinkOnChanges() {\n    this.linkInputChangesSubscription?.unsubscribe();\n    const allLinkChanges =\n        [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref]\n            .filter((link): link is RouterLink|RouterLinkWithHref => !!link)\n            .map(link => link.onChanges);\n    this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n      if (this.isActive !== this.isLinkActive(this.router)(link)) {\n        this.update();\n      }\n    });\n  }\n\n  @Input()\n  set routerLinkActive(data: string[]|string) {\n    const classes = Array.isArray(data) ? data : data.split(' ');\n    this.classes = classes.filter(c => !!c);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    this.update();\n  }\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.routerEventsSubscription.unsubscribe();\n    this.linkInputChangesSubscription?.unsubscribe();\n  }\n\n  private update(): void {\n    if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n    Promise.resolve().then(() => {\n      const hasActiveLinks = this.hasActiveLinks();\n      if (this.isActive !== hasActiveLinks) {\n        (this as any).isActive = hasActiveLinks;\n        this.cdr.markForCheck();\n        this.classes.forEach((c) => {\n          if (hasActiveLinks) {\n            this.renderer.addClass(this.element.nativeElement, c);\n          } else {\n            this.renderer.removeClass(this.element.nativeElement, c);\n          }\n        });\n      }\n    });\n  }\n\n  private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n    const options: boolean|IsActiveMatchOptions =\n        isActiveMatchOptions(this.routerLinkActiveOptions) ?\n        this.routerLinkActiveOptions :\n        // While the types should disallow `undefined` here, it's possible without strict inputs\n        (this.routerLinkActiveOptions.exact || false);\n    return (link: RouterLink|RouterLinkWithHref) => router.isActive(link.urlTree, options);\n  }\n\n  private hasActiveLinks(): boolean {\n    const isActiveCheckFn = this.isLinkActive(this.router);\n    return this.link && isActiveCheckFn(this.link) ||\n        this.linkWithHref && isActiveCheckFn(this.linkWithHref) ||\n        this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);\n  }\n}\n\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options: {exact: boolean}|\n                              IsActiveMatchOptions): options is IsActiveMatchOptions {\n  return !!(options as IsActiveMatchOptions).paths;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef,} from '@angular/core';\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * An interface that defines the contract for developing a component outlet for the `Router`.\n *\n * An outlet acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * A router outlet should register itself with the `Router` via\n * `ChildrenOutletContexts#onChildOutletCreated` and unregister with\n * `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,\n * it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.\n *\n * @see `ChildrenOutletContexts`\n * @publicApi\n */\nexport interface RouterOutletContract {\n  /**\n   * Whether the given outlet is activated.\n   *\n   * An outlet is considered \"activated\" if it has an active component.\n   */\n  isActivated: boolean;\n\n  /** The instance of the activated component or `null` if the outlet is not activated. */\n  component: Object|null;\n\n  /**\n   * The `Data` of the `ActivatedRoute` snapshot.\n   */\n  activatedRouteData: Data;\n\n  /**\n   * The `ActivatedRoute` for the outlet or `null` if the outlet is not activated.\n   */\n  activatedRoute: ActivatedRoute|null;\n\n  /**\n   * Called by the `Router` when the outlet should activate (create a component).\n   */\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null): void;\n\n  /**\n   * A request to destroy the currently activated component.\n   *\n   * When a `RouteReuseStrategy` indicates that an `ActivatedRoute` should be removed but stored for\n   * later re-use rather than destroyed, the `Router` will call `detach` instead.\n   */\n  deactivate(): void;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree.\n   *\n   * This is similar to `deactivate`, but the activated component should _not_ be destroyed.\n   * Instead, it is returned so that it can be reattached later via the `attach` method.\n   */\n  detach(): ComponentRef<unknown>;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree.\n   */\n  attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;\n\n  /**\n   * Emits an activate event when a new component is instantiated\n   **/\n  activateEvents?: EventEmitter<unknown>;\n\n  /**\n   * Emits a deactivate event when a component is destroyed.\n   */\n  deactivateEvents?: EventEmitter<unknown>;\n}\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {\n  private activated: ComponentRef<any>|null = null;\n  private _activatedRoute: ActivatedRoute|null = null;\n  private name: string;\n\n  @Output('activate') activateEvents = new EventEmitter<any>();\n  @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n  constructor(\n      private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n      private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n      private changeDetector: ChangeDetectorRef) {\n    this.name = name || PRIMARY_OUTLET;\n    parentContexts.onChildOutletCreated(this.name, this);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.parentContexts.onChildOutletDestroyed(this.name);\n  }\n\n  /** @nodoc */\n  ngOnInit(): void {\n    if (!this.activated) {\n      // If the outlet was not instantiated at the time the route got activated we need to populate\n      // the outlet when it is initialized (ie inside a NgIf)\n      const context = this.parentContexts.getContext(this.name);\n      if (context && context.route) {\n        if (context.attachRef) {\n          // `attachRef` is populated when there is an existing component to mount\n          this.attach(context.attachRef, context.route);\n        } else {\n          // otherwise the component defined in the configuration is created\n          this.activateWith(context.route, context.resolver || null);\n        }\n      }\n    }\n  }\n\n  get isActivated(): boolean {\n    return !!this.activated;\n  }\n\n  /**\n   * @returns The currently activated component instance.\n   * @throws An error if the outlet is not activated.\n   */\n  get component(): Object {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this.activated.instance;\n  }\n\n  get activatedRoute(): ActivatedRoute {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this._activatedRoute as ActivatedRoute;\n  }\n\n  get activatedRouteData(): Data {\n    if (this._activatedRoute) {\n      return this._activatedRoute.snapshot.data;\n    }\n    return {};\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree\n   */\n  detach(): ComponentRef<any> {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    this.location.detach();\n    const cmp = this.activated;\n    this.activated = null;\n    this._activatedRoute = null;\n    return cmp;\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n   */\n  attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n    this.activated = ref;\n    this._activatedRoute = activatedRoute;\n    this.location.insert(ref.hostView);\n  }\n\n  deactivate(): void {\n    if (this.activated) {\n      const c = this.component;\n      this.activated.destroy();\n      this.activated = null;\n      this._activatedRoute = null;\n      this.deactivateEvents.emit(c);\n    }\n  }\n\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n    if (this.isActivated) {\n      throw new Error('Cannot activate an already activated outlet');\n    }\n    this._activatedRoute = activatedRoute;\n    const snapshot = activatedRoute._futureSnapshot;\n    const component = <any>snapshot.routeConfig!.component;\n    resolver = resolver || this.resolver;\n    const factory = resolver.resolveComponentFactory(component);\n    const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n    const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n    this.activated = this.location.createComponent(factory, this.location.length, injector);\n    // Calling `markForCheck` to make sure we will run the change detection when the\n    // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n    this.changeDetector.markForCheck();\n    this.activateEvents.emit(this.activated.instance);\n  }\n}\n\nclass OutletInjector implements Injector {\n  constructor(\n      private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n      private parent: Injector) {}\n\n  get(token: any, notFoundValue?: any): any {\n    if (token === ActivatedRoute) {\n      return this.route;\n    }\n\n    if (token === ChildrenOutletContexts) {\n      return this.childContexts;\n    }\n\n    return this.parent.get(token, notFoundValue);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {from, Observable, of, Subscription} from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n  abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return fn().pipe(catchError(() => of(null)));\n  }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return of(null);\n  }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n  private loader: RouterConfigLoader;\n  private subscription?: Subscription;\n\n  constructor(\n      private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n      private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n    const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n    const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n  }\n\n  setUpPreloading(): void {\n    this.subscription =\n        this.router.events\n            .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n            .subscribe(() => {});\n  }\n\n  preload(): Observable<any> {\n    const ngModule = this.injector.get(NgModuleRef);\n    return this.processRoutes(ngModule, this.router.config);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this.subscription) {\n      this.subscription.unsubscribe();\n    }\n  }\n\n  private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n    const res: Observable<any>[] = [];\n    for (const route of routes) {\n      // we already have the config loaded, just recurse\n      if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n        const childConfig = route._loadedConfig;\n        res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n        // no config loaded, fetch the config\n      } else if (route.loadChildren && !route.canLoad) {\n        res.push(this.preloadConfig(ngModule, route));\n\n        // recurse into children\n      } else if (route.children) {\n        res.push(this.processRoutes(ngModule, route.children));\n      }\n    }\n    return from(res).pipe(mergeAll(), map((_) => void 0));\n  }\n\n  private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n    return this.preloadingStrategy.preload(route, () => {\n      const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                            this.loader.load(ngModule.injector, route);\n      return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n        route._loadedConfig = config;\n        return this.processRoutes(config.module, config.routes);\n      }));\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {Injectable, OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\n@Injectable()\nexport class RouterScroller implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  private routerEventsSubscription!: Unsubscribable;\n  // TODO(issue/24571): remove '!'.\n  private scrollEventsSubscription!: Unsubscribable;\n\n  private lastId = 0;\n  private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n  private restoredId = 0;\n  private store: {[key: string]: [number, number]} = {};\n\n  constructor(\n      private router: Router,\n      /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n        scrollPositionRestoration?: 'disabled'|'enabled'|'top',\n        anchorScrolling?: 'disabled'|'enabled'\n      } = {}) {\n    // Default both options to 'disabled'\n    options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n    options.anchorScrolling = options.anchorScrolling || 'disabled';\n  }\n\n  init(): void {\n    // we want to disable the automatic scrolling because having two places\n    // responsible for scrolling results race conditions, especially given\n    // that browser don't implement this behavior consistently\n    if (this.options.scrollPositionRestoration !== 'disabled') {\n      this.viewportScroller.setHistoryScrollRestoration('manual');\n    }\n    this.routerEventsSubscription = this.createScrollEvents();\n    this.scrollEventsSubscription = this.consumeScrollEvents();\n  }\n\n  private createScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (e instanceof NavigationStart) {\n        // store the scroll position of the current stable navigations.\n        this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n        this.lastSource = e.navigationTrigger;\n        this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n      } else if (e instanceof NavigationEnd) {\n        this.lastId = e.id;\n        this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n      }\n    });\n  }\n\n  private consumeScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (!(e instanceof Scroll)) return;\n      // a popstate event. The pop state event will always ignore anchor scrolling.\n      if (e.position) {\n        if (this.options.scrollPositionRestoration === 'top') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        } else if (this.options.scrollPositionRestoration === 'enabled') {\n          this.viewportScroller.scrollToPosition(e.position);\n        }\n        // imperative navigation \"forward\"\n      } else {\n        if (e.anchor && this.options.anchorScrolling === 'enabled') {\n          this.viewportScroller.scrollToAnchor(e.anchor);\n        } else if (this.options.scrollPositionRestoration !== 'disabled') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        }\n      }\n    });\n  }\n\n  private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n    this.router.triggerEvent(new Scroll(\n        routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n  }\n\n  /** @nodoc */\n  ngOnDestroy() {\n    if (this.routerEventsSubscription) {\n      this.routerEventsSubscription.unsubscribe();\n    }\n    if (this.scrollEventsSubscription) {\n      this.scrollEventsSubscription.unsubscribe();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, Location, LOCATION_INITIALIZED, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, OnDestroy, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {of, Subject} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {Event} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES =\n    [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n  Location,\n  {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n  {\n    provide: Router,\n    useFactory: setupRouter,\n    deps: [\n      UrlSerializer, ChildrenOutletContexts, Location, Injector, NgModuleFactoryLoader, Compiler,\n      ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n      [RouteReuseStrategy, new Optional()]\n    ]\n  },\n  ChildrenOutletContexts,\n  {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n  {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n  RouterPreloader,\n  NoPreloading,\n  PreloadAllModules,\n  {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n  return new NgProbeToken('Router', Router);\n}\n\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/router) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\n@NgModule({\n  declarations: ROUTER_DIRECTIVES,\n  exports: ROUTER_DIRECTIVES,\n  entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n  // Note: We are injecting the Router so it gets created eagerly...\n  constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n  /**\n   * Creates and configures a module with all the router providers and directives.\n   * Optionally sets up an application listener to perform an initial navigation.\n   *\n   * When registering the NgModule at the root, import as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forRoot(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the application.\n   * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n   * @return The new `NgModule`.\n   *\n   */\n  static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [\n        ROUTER_PROVIDERS,\n        provideRoutes(routes),\n        {\n          provide: ROUTER_FORROOT_GUARD,\n          useFactory: provideForRootGuard,\n          deps: [[Router, new Optional(), new SkipSelf()]]\n        },\n        {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n        {\n          provide: LocationStrategy,\n          useFactory: provideLocationStrategy,\n          deps:\n              [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]\n        },\n        {\n          provide: RouterScroller,\n          useFactory: createRouterScroller,\n          deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n        },\n        {\n          provide: PreloadingStrategy,\n          useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n                                                             NoPreloading\n        },\n        {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n        provideRouterInitializer(),\n      ],\n    };\n  }\n\n  /**\n   * Creates a module with all the router directives and a provider registering routes,\n   * without creating a new Router service.\n   * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forChild(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n   * @return The new NgModule.\n   *\n   */\n  static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n    return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n  }\n}\n\nexport function createRouterScroller(\n    router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n  if (config.scrollOffset) {\n    viewportScroller.setOffset(config.scrollOffset);\n  }\n  return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n    platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n  return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n                           new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n  if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n    throw new Error(\n        `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n  }\n  return 'guarded';\n}\n\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n *   imports: [RouterModule.forChild(ROUTES)],\n *   providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n  return [\n    {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n    {provide: ROUTES, multi: true, useValue: routes},\n  ];\n}\n\n/**\n * Allowed values in an `ExtraOptions` object that configure\n * when the router performs the initial navigation operation.\n *\n * * 'enabledNonBlocking' - (default) The initial navigation starts after the\n * root component has been created. The bootstrap is not blocked on the completion of the initial\n * navigation.\n * * 'enabledBlocking' - The initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete. This value is required\n * for [server-side rendering](guide/universal) to work.\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\n * the root component gets created. Use if there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic.\n *\n * The following values have been [deprecated](guide/releases#deprecation-practices) since v11,\n * and should not be used for new applications.\n *\n * * 'enabled' - This option is 1:1 replaceable with `enabledBlocking`.\n *\n * @see `forRoot()`\n *\n * @publicApi\n */\nexport type InitialNavigation = 'disabled'|'enabled'|'enabledBlocking'|'enabledNonBlocking';\n\n/**\n * A set of configuration options for a router module, provided in the\n * `forRoot()` method.\n *\n * @see `forRoot()`\n *\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n  /**\n   * When true, log all internal navigation events to the console.\n   * Use for debugging.\n   */\n  enableTracing?: boolean;\n\n  /**\n   * When true, enable the location strategy that uses the URL fragment\n   * instead of the history API.\n   */\n  useHash?: boolean;\n\n  /**\n   * One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.\n   * When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root\n   * component is created. The bootstrap is blocked until the initial navigation is complete. This\n   * value is required for [server-side rendering](guide/universal) to work. When set to\n   * `enabledNonBlocking`, the initial navigation starts after the root component has been created.\n   * The bootstrap is not blocked on the completion of the initial navigation. When set to\n   * `disabled`, the initial navigation is not performed. The location listener is set up before the\n   * root component gets created. Use if there is a reason to have more control over when the router\n   * starts its initial navigation due to some complex initialization logic.\n   */\n  initialNavigation?: InitialNavigation;\n\n  /**\n   * A custom error handler for failed navigations.\n   * If the handler returns a value, the navigation Promise is resolved with this value.\n   * If the handler throws an exception, the navigation Promise is rejected with the exception.\n   *\n   */\n  errorHandler?: ErrorHandler;\n\n  /**\n   * Configures a preloading strategy.\n   * One of `PreloadAllModules` or `NoPreloading` (the default).\n   */\n  preloadingStrategy?: any;\n\n  /**\n   * Define what the router should do if it receives a navigation request to the current URL.\n   * Default is `ignore`, which causes the router ignores the navigation.\n   * This can disable features such as a \"refresh\" button.\n   * Use this option to configure the behavior when navigating to the\n   * current URL. Default is 'ignore'.\n   */\n  onSameUrlNavigation?: 'reload'|'ignore';\n\n  /**\n   * Configures if the scroll position needs to be restored when navigating back.\n   *\n   * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\n   * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\n   * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\n   * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\n   * navigation). This option will be the default in the future.\n   *\n   * You can implement custom scroll restoration behavior by adapting the enabled behavior as\n   * in the following example.\n   *\n   * ```typescript\n   * class AppModule {\n   *   constructor(router: Router, viewportScroller: ViewportScroller) {\n   *     router.events.pipe(\n   *       filter((e: Event): e is Scroll => e instanceof Scroll)\n   *     ).subscribe(e => {\n   *       if (e.position) {\n   *         // backward navigation\n   *         viewportScroller.scrollToPosition(e.position);\n   *       } else if (e.anchor) {\n   *         // anchor navigation\n   *         viewportScroller.scrollToAnchor(e.anchor);\n   *       } else {\n   *         // forward navigation\n   *         viewportScroller.scrollToPosition([0, 0]);\n   *       }\n   *     });\n   *   }\n   * }\n   * ```\n   */\n  scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n  /**\n   * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\n   * Anchor scrolling is disabled by default.\n   *\n   * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n   * that we stored or scroll to the top.\n   */\n  anchorScrolling?: 'disabled'|'enabled';\n\n  /**\n   * Configures the scroll offset the router will use when scrolling to an element.\n   *\n   * When given a tuple with x and y position value,\n   * the router uses that offset each time it scrolls.\n   * When given a function, the router invokes the function every time\n   * it restores scroll position.\n   */\n  scrollOffset?: [number, number]|(() => [number, number]);\n\n  /**\n   * Defines how the router merges parameters, data, and resolved data from parent to child\n   * routes. By default ('emptyOnly'), inherits parent parameters only for\n   * path-less or component-less routes.\n   *\n   * Set to 'always' to enable unconditional inheritance of parent parameters.\n   *\n   * Note that when dealing with matrix parameters, \"parent\" refers to the parent `Route`\n   * config which does not necessarily mean the \"URL segment to the left\". When the `Route` `path`\n   * contains multiple segments, the matrix parameters must appear on the last segment. For example,\n   * matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not\n   * `a;foo=bar/b`.\n   *\n   */\n  paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n  /**\n   * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\n   * invalid character sequences.\n   * The default implementation is to redirect to the root URL, dropping\n   * any path or parameter information. The function takes three parameters:\n   *\n   * - `'URIError'` - Error thrown when parsing a bad URL.\n   * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n   * - `'url'` -  The malformed URL that caused the URIError\n   * */\n  malformedUriErrorHandler?:\n      (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n  /**\n   * Defines when the router updates the browser URL. By default ('deferred'),\n   * update after successful navigation.\n   * Set to 'eager' if prefer to update the URL at the beginning of navigation.\n   * Updating the URL early allows you to handle a failure of navigation by\n   * showing an error message with the URL that failed.\n   */\n  urlUpdateStrategy?: 'deferred'|'eager';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * Example:\n   *\n   * ```\n   * const routes = [\n   *   {\n   *     path: '',\n   *     component: ContainerComponent,\n   *     children: [\n   *       { path: 'a', component: AComponent },\n   *       { path: 'b', component: BComponent },\n   *     ]\n   *   }\n   * ];\n   * ```\n   *\n   * From the `ContainerComponent`, you should be able to navigate to `AComponent` using\n   * the following `routerLink`, but it will not work if `relativeLinkResolution` is set\n   * to `'legacy'`:\n   *\n   * `<a [routerLink]=\"['./a']\">Link to A</a>`\n   *\n   * However, this will work:\n   *\n   * `<a [routerLink]=\"['../a']\">Link to A</a>`\n   *\n   * In other words, you're required to use `../` rather than `./` when the relative link\n   * resolution is set to `'legacy'`.\n   *\n   * The default in v11 is `corrected`.\n   */\n  relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n    urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n    injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][],\n    opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n    routeReuseStrategy?: RouteReuseStrategy) {\n  const router = new Router(\n      null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n  if (urlHandlingStrategy) {\n    router.urlHandlingStrategy = urlHandlingStrategy;\n  }\n\n  if (routeReuseStrategy) {\n    router.routeReuseStrategy = routeReuseStrategy;\n  }\n\n  assignExtraOptionsToRouter(opts, router);\n\n  if (opts.enableTracing) {\n    router.events.subscribe((e: Event) => {\n      // tslint:disable:no-console\n      console.group?.(`Router Event: ${(<any>e.constructor).name}`);\n      console.log(e.toString());\n      console.log(e);\n      console.groupEnd?.();\n      // tslint:enable:no-console\n    });\n  }\n\n  return router;\n}\n\nexport function assignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void {\n  if (opts.errorHandler) {\n    router.errorHandler = opts.errorHandler;\n  }\n\n  if (opts.malformedUriErrorHandler) {\n    router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n  }\n\n  if (opts.onSameUrlNavigation) {\n    router.onSameUrlNavigation = opts.onSameUrlNavigation;\n  }\n\n  if (opts.paramsInheritanceStrategy) {\n    router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n  }\n\n  if (opts.relativeLinkResolution) {\n    router.relativeLinkResolution = opts.relativeLinkResolution;\n  }\n\n  if (opts.urlUpdateStrategy) {\n    router.urlUpdateStrategy = opts.urlUpdateStrategy;\n  }\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n  return router.routerState.root;\n}\n\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer implements OnDestroy {\n  private initNavigation = false;\n  private destroyed = false;\n  private resultOfPreactivationDone = new Subject<void>();\n\n  constructor(private injector: Injector) {}\n\n  appInitializer(): Promise<any> {\n    const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n    return p.then(() => {\n      // If the injector was destroyed, the DI lookups below will fail.\n      if (this.destroyed) {\n        return Promise.resolve(true);\n      }\n\n      let resolve: Function = null!;\n      const res = new Promise(r => resolve = r);\n      const router = this.injector.get(Router);\n      const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n      if (opts.initialNavigation === 'disabled') {\n        router.setUpLocationChangeListener();\n        resolve(true);\n      } else if (\n          // TODO: enabled is deprecated as of v11, can be removed in v13\n          opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') {\n        router.hooks.afterPreactivation = () => {\n          // only the initial navigation should be delayed\n          if (!this.initNavigation) {\n            this.initNavigation = true;\n            resolve(true);\n            return this.resultOfPreactivationDone;\n\n            // subsequent navigations should not be delayed\n          } else {\n            return of(null) as any;\n          }\n        };\n        router.initialNavigation();\n      } else {\n        resolve(true);\n      }\n\n      return res;\n    });\n  }\n\n  bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n    const opts = this.injector.get(ROUTER_CONFIGURATION);\n    const preloader = this.injector.get(RouterPreloader);\n    const routerScroller = this.injector.get(RouterScroller);\n    const router = this.injector.get(Router);\n    const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n\n    // Default case\n    if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) {\n      router.initialNavigation();\n    }\n\n    preloader.setUpPreloading();\n    routerScroller.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    this.resultOfPreactivationDone.next(null!);\n    this.resultOfPreactivationDone.complete();\n  }\n\n  ngOnDestroy() {\n    this.destroyed = true;\n  }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n  return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n  return r.bootstrapListener.bind(r);\n}\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n    new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer(): ReadonlyArray<Provider> {\n  return [\n    RouterInitializer,\n    {\n      provide: APP_INITIALIZER,\n      multi: true,\n      useFactory: getAppInitializer,\n      deps: [RouterInitializer]\n    },\n    {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n  ];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('12.2.13');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, DeprecatedLoadChildren, LoadChildren, LoadChildrenCallback, QueryParamsHandling, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatcher, UrlMatchResult} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet, RouterOutletContract} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {BaseRouteReuseStrategy, DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationBehaviorOptions, NavigationExtras, Router, UrlCreationOptions} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, InitialNavigation, provideRoutes, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, IsActiveMatchOptions, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {EmptyOutletComponent as ɵangular_packages_router_router_l} from './src/components/empty_outlet';\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_o} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_m,TreeNode as ɵangular_packages_router_router_n} from './src/utils/tree';"],"names":["isObservable","isPromise","from","of","BehaviorSubject","map","switchMap","combineLatest","take","startWith","scan","filter","Component","EmptyOutletComponent","noMatch","Observable","NgModuleRef","catchError","concatMap","last","first","EmptyError","mergeMap","tap","applyRedirects","applyRedirectsFn","concat","defer","NoMatch","recognize","recognizeFn","takeLast","EMPTY","InjectionToken","InjectFlags","ConnectableObservable","Subject","refCount","NgModuleFactory","Console","NgZone","finalize","Injectable","Type","Location","Injector","NgModuleFactoryLoader","Compiler","Directive","Attribute","Renderer2","ElementRef","Input","HostListener","LocationStrategy","HostBinding","mergeAll","ChangeDetectorRef","Optional","ContentChildren","EventEmitter","ViewContainerRef","ComponentFactoryResolver","Output","ViewportScroller","SystemJsNgModuleLoader","NgProbeToken","SkipSelf","PlatformLocation","Inject","APP_BASE_HREF","NgModule","HashLocationStrategy","PathLocationStrategy","ANALYZE_FOR_ENTRY_COMPONENTS","LOCATION_INITIALIZED","ApplicationRef","APP_INITIALIZER","APP_BOOTSTRAP_LISTENER","Version"],"mappings":";;;;;;;;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;gBAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;oBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtG,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;aAEc,SAAS,CAAC,CAAC,EAAE,CAAC;QAC1B,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;;;;;;;;ICAA;;;;;;;;ICAA;;;;;;;IAeA;;ICfA;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
Index: trip-planner-front/node_modules/@angular/router/esm2015/src/router.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/esm2015/src/router.js	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/esm2015/src/router.js	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -438,4 +438,5 @@
                 }
             }), finalize(() => {
+                var _a;
                 /* When the navigation stream finishes either through error or success, we
                  * set the `completed` or `errored` flag. However, there are some situations
@@ -470,8 +471,9 @@
                     }
                 }
-                // currentNavigation should always be reset to null here. If navigation was
-                // successful, lastSuccessfulTransition will have already been set. Therefore
-                // we can safely set currentNavigation to null here.
-                this.currentNavigation = null;
+                // Only clear current navigation if it is still set to the one that
+                // finalized.
+                if (((_a = this.currentNavigation) === null || _a === void 0 ? void 0 : _a.id) === t.id) {
+                    this.currentNavigation = null;
+                }
             }), catchError((e) => {
                 // TODO(atscott): The NavigationTransition `t` used here does not accurately
@@ -1077,3 +1079,3 @@
     return source !== 'imperative';
 }
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcm91dGVyL3NyYy9yb3V0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFDLFFBQVEsRUFBZ0IsTUFBTSxpQkFBaUIsQ0FBQztBQUN4RCxPQUFPLEVBQUMsUUFBUSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUscUJBQXFCLEVBQUUsV0FBVyxFQ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ICAgICAgICAvLyBTdG9yZSB0aGUgTmF2aWdhdGlvbiBvYmplY3RcbiAgICAgICAgICAgICAgICAgICAgIHRhcCh0ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50TmF2aWdhdGlvbiA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBpZDogdC5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICBpbml0aWFsVXJsOiB0LmN1cnJlbnRSYXdVcmwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmFjdGVkVXJsOiB0LmV4dHJhY3RlZFVybCxcbiAgICAgICAgICAgICAgICAgICAgICAgICB0cmlnZ2VyOiB0LnNvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYXM6IHQuZXh0cmFzLFxuICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzTmF2aWdhdGlvbjogdGhpcy5sYXN0U3VjY2Vzc2Z1bE5hdmlnYXRpb24gP1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Li4udGhpcy5sYXN0U3VjY2Vzc2Z1bE5hdmlnYXRpb24sIHByZXZpb3VzTmF2aWdhdGlvbjogbnVsbH0gOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudWxsXG4gICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgIHN3aXRjaE1hcCh0ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYnJvd3NlclVybFRyZWUgPSB0aGlzLmJyb3dzZXJVcmxUcmVlLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHVybFRyYW5zaXRpb24gPSAhdGhpcy5uYXZpZ2F0ZWQgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHQuZXh0cmFjdGVkVXJsLnRvU3RyaW5nKCkgIT09IGJyb3dzZXJVcmxUcmVlIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBOYXZpZ2F0aW9ucyB3aGljaCBzdWNjZWVkIG9yIG9uZXMgd2hpY2ggZmFpbCBhbmQgYXJlIGNsZWFuZWQgdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNvcnJlY3RseSBzaG91bGQgcmVzdWx0IGluIGBicm93c2VyVXJsVHJlZWAgYW5kIGBjdXJyZW50VXJsVHJlZWBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG1hdGNoaW5nLiBJZiB0aGlzIGlzIG5vdCB0aGUgY2FzZSwgYXNzdW1lIHNvbWV0aGluZyB3ZW50IHdyb25nIGFuZCB0cnlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHByb2Nlc3NpbmcgdGhlIFVSTCBhZ2Fpbi5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyb3dzZXJVcmxUcmVlICE9PSB0aGlzLmN1cnJlbnRVcmxUcmVlLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHByb2Nlc3NDdXJyZW50VXJsID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aGlzLm9uU2FtZVVybE5hdmlnYXRpb24gPT09ICdyZWxvYWQnID8gdHJ1ZSA6IHVybFRyYW5zaXRpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVybEhhbmRsaW5nU3RyYXRlZ3kuc2hvdWxkUHJvY2Vzc1VybCh0LnJhd1VybCk7XG5cblxuICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJvY2Vzc0N1cnJlbnRVcmwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiB0aGUgc291cmNlIG9mIHRoZSBuYXZpZ2F0aW9uIGlzIGZyb20gYSBicm93c2VyIGV2ZW50LCB0aGUgVVJMIGlzXG4gICAgICAgICAgICAgICAgICAgICAgICAgLy8gYWxyZWFkeSB1cGRhdGVkLiBXZSBhbHJlYWR5IG5lZWQgdG8gc3luYyB0aGUgaW50ZXJuYWwgc3RhdGUuXG4gICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzQnJvd3NlclRyaWdnZXJlZE5hdmlnYXRpb24odC5zb3VyY2UpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmJyb3dzZXJVcmxUcmVlID0gdC5leHRyYWN0ZWRVcmw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvZih0KS5waXBlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGaXJlIE5hdmlnYXRpb25TdGFydCBldmVudFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hNYXAodCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdHJhbnNpdGlvbiA9IHRoaXMudHJhbnNpdGlvbnMuZ2V0VmFsdWUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudHNTdWJqZWN0Lm5leHQobmV3IE5hdmlnYXRpb25TdGFydChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5pZCwgdGhpcy5zZXJpYWxpemVVcmwodC5leHRyYWN0ZWRVcmwpLCB0LnNvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5yZXN0b3JlZFN0YXRlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRyYW5zaXRpb24gIT09IHRoaXMudHJhbnNpdGlvbnMuZ2V0VmFsdWUoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEVNUFRZO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgZGVsYXkgaXMgcmVxdWlyZWQgdG8gbWF0Y2ggb2xkIGJlaGF2aW9yIHRoYXQgZm9yY2VkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbmF2aWdhdGlvbiB0byBhbHdheXMgYmUgYXN5bmNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBBcHBseVJlZGlyZWN0c1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBseVJlZGlyZWN0cyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubmdNb2R1bGUuaW5qZWN0b3IsIHRoaXMuY29uZmlnTG9hZGVyLCB0aGlzLnVybFNlcmlhbGl6ZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbmZpZyksXG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVXBkYXRlIHRoZSBjdXJyZW50TmF2aWdhdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXAodCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50TmF2aWdhdGlvbiA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnRoaXMuY3VycmVudE5hdmlnYXRpb24hLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmluYWxVcmw6IHQudXJsQWZ0ZXJSZWRpcmVjdHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBSZWNvZ25pemVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjb2duaXplKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yb290Q29tcG9uZW50VHlwZSwgdGhpcy5jb25maWcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodXJsKSA9PiB0aGlzLnNlcmlhbGl6ZVVybCh1cmwpLCB0aGlzLnBhcmFtc0luaGVyaXRhbmNlU3RyYXRlZ3ksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbGF0aXZlTGlua1Jlc29sdXRpb24pLFxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSBVUkwgaWYgaW4gYGVhZ2VyYCB1cGRhdGUgbW9kZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXAodCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMudXJsVXBkYXRlU3RyYXRlZ3kgPT09ICdlYWdlcicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdC5leHRyYXMuc2tpcExvY2F0aW9uQ2hhbmdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QnJvd3NlclVybCh0LnVybEFmdGVyUmVkaXJlY3RzLCB0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVE9ETyhhdHNjb3R0KTogVGhlIGFib3ZlIGxpbmUgaXMgaW5jb3JyZWN0LiBJdCBzZXRzIHRoZSB1cmwgdG9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gb25seSB0aGUgcGFydCB0aGF0IGlzIGhhbmRsZWQgYnkgdGhlIHJvdXRlci4gSXQgc2hvdWxkIG1lcmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoYXQgd2l0aCB0aGUgcmF3VXJsIHNvIHRoZSB1cmwgaW5jbHVkZXMgc2VnbWVudHMgbm90IGhhbmRsZWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYnkgdGhlIHJvdXRlcjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gIGNvbnN0IHJhd1VybCA9IHRoaXMudXJsSGFuZGxpbmdTdHJhdGVneS5tZXJnZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICB0LnVybEFmdGVyUmVkaXJlY3RzLCB0LnJhd1VybCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICB0aGlzLnNldEJyb3dzZXJVcmwocmF3VXJsLCB0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYnJvd3NlclVybFRyZWUgPSB0LnVybEFmdGVyUmVkaXJlY3RzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZpcmUgUm91dGVzUmVjb2duaXplZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJvdXRlc1JlY29nbml6ZWQgPSBuZXcgUm91dGVzUmVjb2duaXplZChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5pZCwgdGhpcy5zZXJpYWxpemVVcmwodC5leHRyYWN0ZWRVcmwpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlcmlhbGl6ZVVybCh0LnVybEFmdGVyUmVkaXJlY3RzKSwgdC50YXJnZXRTbmFwc2hvdCEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50c1N1YmplY3QubmV4dChyb3V0ZXNSZWNvZ25pemVkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHByb2Nlc3NQcmV2aW91c1VybCA9IHVybFRyYW5zaXRpb24gJiYgdGhpcy5yYXdVcmxUcmVlICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudXJsSGFuZGxpbmdTdHJhdGVneS5zaG91bGRQcm9jZXNzVXJsKHRoaXMucmF3VXJsVHJlZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgLyogV2hlbiB0aGUgY3VycmVudCBVUkwgc2hvdWxkbid0IGJlIHByb2Nlc3NlZCwgYnV0IHRoZSBwcmV2aW91cyBvbmUgd2FzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAqIHdlIGhhbmRsZSB0aGlzIFwiZXJyb3IgY29uZGl0aW9uXCIgYnkgbmF2aWdhdGluZyB0byB0aGUgcHJldmlvdXNseVxuICAgICAgICAgICAgICAgICAgICAgICAgICAqIHN1Y2Nlc3NmdWwgVVJMLCBidXQgbGVhdmluZyB0aGUgVVJMIGludGFjdC4qL1xuICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcm9jZXNzUHJldmlvdXNVcmwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHtpZCwgZXh0cmFjdGVkVXJsLCBzb3VyY2UsIHJlc3RvcmVkU3RhdGUsIGV4dHJhc30gPSB0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmF2U3RhcnQgPSBuZXcgTmF2aWdhdGlvblN0YXJ0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkLCB0aGlzLnNlcmlhbGl6ZVVybChleHRyYWN0ZWRVcmwpLCBzb3VyY2UsIHJlc3RvcmVkU3RhdGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRzU3ViamVjdC5uZXh0KG5hdlN0YXJ0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHRhcmdldFNuYXBzaG90ID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmVhdGVFbXB0eVN0YXRlKGV4dHJhY3RlZFVybCwgdGhpcy5yb290Q29tcG9uZW50VHlwZSkuc25hcHNob3Q7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvZih7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldFNuYXBzaG90LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxBZnRlclJlZGlyZWN0czogZXh0cmFjdGVkVXJsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYXM6IHsuLi5leHRyYXMsIHNraXBMb2NhdGlvbkNoYW5nZTogZmFsc2UsIHJlcGxhY2VVcmw6IGZhbHNlfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBXaGVuIG5laXRoZXIgdGhlIGN1cnJlbnQgb3IgcHJldmlvdXMgVVJMIGNhbiBiZSBwcm9jZXNzZWQsIGRvIG5vdGhpbmdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIG90aGVyIHRoYW4gdXBkYXRlIHJvdXRlcidzIGludGVybmFsIHJlZmVyZW5jZSB0byB0aGUgY3VycmVudCBcInNldHRsZWRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICogVVJMLiBUaGlzIHdheSB0aGUgbmV4dCBuYXZpZ2F0aW9uIHdpbGwgYmUgY29taW5nIGZyb20gdGhlIGN1cnJlbnQgVVJMXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBpbiB0aGUgYnJvd3Nlci5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yYXdVcmxUcmVlID0gdC5yYXdVcmw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmJyb3dzZXJVcmxUcmVlID0gdC51cmxBZnRlclJlZGlyZWN0cztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHQucmVzb2x2ZShudWxsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBFTVBUWTtcbiAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgIH0pLFxuXG4gICAgICAgICAgICAgICAgICAgICAvLyBCZWZvcmUgUHJlYWN0aXZhdGlvblxuICAgICAgICAgICAgICAgICAgICAgc3dpdGNoVGFwKHQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0U25hcHNob3QsXG4gICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IG5hdmlnYXRpb25JZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYWN0ZWRVcmw6IGFwcGxpZWRVcmxUcmVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgIHJhd1VybDogcmF3VXJsVHJlZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYXM6IHtza2lwTG9jYXRpb25DaGFuZ2UsIHJlcGxhY2VVcmx9XG4gICAgICAgICAgICAgICAgICAgICAgIH0gPSB0O1xuICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5ob29rcy5iZWZvcmVQcmVhY3RpdmF0aW9uKHRhcmdldFNuYXBzaG90ISwge1xuICAgICAgICAgICAgICAgICAgICAgICAgIG5hdmlnYXRpb25JZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICBhcHBsaWVkVXJsVHJlZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICByYXdVcmxUcmVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgIHNraXBMb2NhdGlvbkNoYW5nZTogISFza2lwTG9jYXRpb25DaGFuZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgcmVwbGFjZVVybDogISFyZXBsYWNlVXJsLFxuICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgIH0pLFxuXG4gICAgICAgICAgICAgICAgICAgICAvLyAtLS0gR1VBUkRTIC0tLVxuICAgICAgICAgICAgICAgICAgICAgdGFwKHQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBndWFyZHNTdGFydCA9IG5ldyBHdWFyZHNDaGVja1N0YXJ0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5pZCwgdGhpcy5zZXJpYWxpemVVcmwodC5leHRyYWN0ZWRVcmwpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXJpYWxpemVVcmwodC51cmxBZnRlclJlZGlyZWN0cyksIHQudGFyZ2V0U25hcHNob3QhKTtcbiAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnQoZ3VhcmRzU3RhcnQpO1xuICAgICAgICAgICAgICAgICAgICAgfSksXG5cbiAgICAgICAgICAgICAgICAgICAgIG1hcCh0ID0+ICh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAuLi50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3VhcmRzOiBnZXRBbGxSb3V0ZUd1YXJkcyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0LnRhcmdldFNuYXBzaG90ISwgdC5jdXJyZW50U25hcHNob3QsIHRoaXMucm9vdENvbnRleHRzKVxuICAgICAgICAgICAgICAgICAgICAgICAgIH0pKSxcblxuICAgICAgICAgICAgICAgICAgICAgY2hlY2tHdWFyZHModGhpcy5uZ01vZHVsZS5pbmplY3RvciwgKGV2dDogRXZlbnQpID0+IHRoaXMudHJpZ2dlckV2ZW50KGV2dCkpLFxuICAgICAgICAgICAgICAgICAgICAgdGFwKHQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNVcmxUcmVlKHQuZ3VhcmRzUmVzdWx0KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVycm9yOiBFcnJvciZ7dXJsPzogVXJsVHJlZX0gPSBuYXZpZ2F0aW9uQ2FuY2VsaW5nRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGBSZWRpcmVjdGluZyB0byBcIiR7dGhpcy5zZXJpYWxpemVVcmwodC5ndWFyZHNSZXN1bHQpfVwiYCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IudXJsID0gdC5ndWFyZHNSZXN1bHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBndWFyZHNFbmQgPSBuZXcgR3VhcmRzQ2hlY2tFbmQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0LmlkLCB0aGlzLnNlcmlhbGl6ZVVybCh0LmV4dHJhY3RlZFVybCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlcmlhbGl6ZVVybCh0LnVybEFmdGVyUmVkaXJlY3RzKSwgdC50YXJnZXRTbmFwc2hvdCEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAhIXQuZ3VhcmRzUmVzdWx0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnQoZ3VhcmRzRW5kKTtcbiAgICAgICAgICAgICAgICAgICAgIH0pLFxuXG4gICAgICAgICAgICAgICAgICAgICBmaWx0ZXIodCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgIGlmICghdC5ndWFyZHNSZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc3RvcmVIaXN0b3J5KHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY2FuY2VsTmF2aWdhdGlvblRyYW5zaXRpb24odCwgJycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgIH0pLFxuXG4gICAgICAgICAgICAgICAgICAgICAvLyAtLS0gUkVTT0xWRSAtLS1cbiAgICAgICAgICAgICAgICAgICAgIHN3aXRjaFRhcCh0ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgaWYgKHQuZ3VhcmRzLmNhbkFjdGl2YXRlQ2hlY2tzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvZih0KS5waXBlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXAodCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzb2x2ZVN0YXJ0ID0gbmV3IFJlc29sdmVTdGFydChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5pZCwgdGhpcy5zZXJpYWxpemVVcmwodC5leHRyYWN0ZWRVcmwpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlcmlhbGl6ZVVybCh0LnVybEFmdGVyUmVkaXJlY3RzKSwgdC50YXJnZXRTbmFwc2hvdCEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudHJpZ2dlckV2ZW50KHJlc29sdmVTdGFydCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hNYXAodCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGFSZXNvbHZlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvZih0KS5waXBlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlRGF0YShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGFyYW1zSW5oZXJpdGFuY2VTdHJhdGVneSwgdGhpcy5uZ01vZHVsZS5pbmplY3RvciksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV4dDogKCkgPT4gZGF0YVJlc29sdmVkID0gdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZTogKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFkYXRhUmVzb2x2ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXN0b3JlSGlzdG9yeSh0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jYW5jZWxOYXZpZ2F0aW9uVHJhbnNpdGlvbihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgQXQgbGVhc3Qgb25lIHJvdXRlIHJlc29sdmVyIGRpZG4ndCBlbWl0IGFueSB2YWx1ZS5gKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXAodCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzb2x2ZUVuZCA9IG5ldyBSZXNvbHZlRW5kKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0LmlkLCB0aGlzLnNlcmlhbGl6ZVVybCh0LmV4dHJhY3RlZFVybCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VyaWFsaXplVXJsKHQudXJsQWZ0ZXJSZWRpcmVjdHMpLCB0LnRhcmdldFNuYXBzaG90ISk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnQocmVzb2x2ZUVuZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgfSksXG5cbiAgICAgICAgICAgICAgICAgICAgIC8vIC0tLSBBRlRFUiBQUkVBQ1RJVkFUSU9OIC0tLVxuICAgICAgICAgICAgICAgICAgICAgc3dpdGNoVGFwKCh0OiBOYXZpZ2F0aW9uVHJhbnNpdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0U25hcHNob3QsXG4gICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IG5hdmlnYXRpb25JZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYWN0ZWRVcmw6IGFwcGxpZWRVcmxUcmVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgIHJhd1VybDogcmF3VXJsVHJlZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYXM6IHtza2lwTG9jYXRpb25DaGFuZ2UsIHJlcGxhY2VVcmx9XG4gICAgICAgICAgICAgICAgICAgICAgIH0gPSB0O1xuICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5ob29rcy5hZnRlclByZWFjdGl2YXRpb24odGFyZ2V0U25hcHNob3QhLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgbmF2aWdhdGlvbklkLFxuICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGxpZWRVcmxUcmVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgIHJhd1VybFRyZWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgc2tpcExvY2F0aW9uQ2hhbmdlOiAhIXNraXBMb2NhdGlvbkNoYW5nZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICByZXBsYWNlVXJsOiAhIXJlcGxhY2VVcmwsXG4gICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgfSksXG5cbiAgICAgICAgICAgICAgICAgICAgIG1hcCgodDogTmF2aWdhdGlvblRyYW5zaXRpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdGFyZ2V0Um91dGVyU3RhdGUgPSBjcmVhdGVSb3V0ZXJTdGF0ZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucm91dGVSZXVzZVN0cmF0ZWd5LCB0LnRhcmdldFNuYXBzaG90ISwgdC5jdXJyZW50Um91dGVyU3RhdGUpO1xuICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKHsuLi50LCB0YXJnZXRSb3V0ZXJTdGF0ZX0pO1xuICAgICAgICAgICAgICAgICAgICAgfSksXG5cbiAgICAgICAgICAgICAgICAgICAgIC8qIE9uY2UgaGVyZSwgd2UgYXJlIGFib3V0IHRvIGFjdGl2YXRlIHN5bmNyb25vdXNseS4gVGhlIGFzc3VtcHRpb24gaXMgdGhpc1xuICAgICAgICAgICAgICAgICAgICAgICAgd2lsbCBzdWNjZWVkLCBhbmQgdXNlciBjb2RlIG1heSByZWFkIGZyb20gdGhlIFJvdXRlciBzZXJ2aWNlLiBUaGVyZWZvcmVcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlZm9yZSBhY3RpdmF0aW9uLCB3ZSBuZWVkIHRvIHVwZGF0ZSByb3V0ZXIgcHJvcGVydGllcyBzdG9yaW5nIHRoZSBjdXJyZW50XG4gICAgICAgICAgICAgICAgICAgICAgICBVUkwgYW5kIHRoZSBSb3V0ZXJTdGF0ZSwgYXMgd2VsbCBhcyB1cGRhdGVkIHRoZSBicm93c2VyIFVSTC4gQWxsIHRoaXMgc2hvdWxkXG4gICAgICAgICAgICAgICAgICAgICAgICBoYXBwZW4gKmJlZm9yZSogYWN0aXZhdGluZy4gKi9cbiAgICAgICAgICAgICAgICAgICAgIHRhcCgodDogTmF2aWdhdGlvblRyYW5zaXRpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50VXJsVHJlZSA9IHQudXJsQWZ0ZXJSZWRpcmVjdHM7XG4gICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmF3VXJsVHJlZSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVybEhhbmRsaW5nU3RyYXRlZ3kubWVyZ2UodC51cmxBZnRlclJlZGlyZWN0cywgdC5yYXdVcmwpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICh0aGlzIGFzIHtyb3V0ZXJTdGF0ZTogUm91dGVyU3RhdGV9KS5yb3V0ZXJTdGF0ZSA9IHQudGFyZ2V0Um91dGVyU3RhdGUhO1xuXG4gICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnVybFVwZGF0ZVN0cmF0ZWd5ID09PSAnZGVmZXJyZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF0LmV4dHJhcy5za2lwTG9jYXRpb25DaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QnJvd3NlclVybCh0aGlzLnJhd1VybFRyZWUsIHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmJyb3dzZXJVcmxUcmVlID0gdC51cmxBZnRlclJlZGlyZWN0cztcbiAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgfSksXG5cbiAgICAgICAgICAgICAgICAgICAgIGFjdGl2YXRlUm91dGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucm9vdENvbnRleHRzLCB0aGlzLnJvdXRlUmV1c2VTdHJhdGVneSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAoZXZ0OiBFdmVudCkgPT4gdGhpcy50cmlnZ2VyRXZlbnQoZXZ0KSksXG5cbiAgICAgICAgICAgICAgICAgICAgIHRhcCh7XG4gICAgICAgICAgICAgICAgICAgICAgIG5leHQoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGUoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICBmaW5hbGl6ZSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgIC8qIFdoZW4gdGhlIG5hdmlnYXRpb24gc3RyZWFtIGZpbmlzaGVzIGVpdGhlciB0aHJvdWdoIGVycm9yIG9yIHN1Y2Nlc3MsIHdlXG4gICAgICAgICAgICAgICAgICAgICAgICAqIHNldCB0aGUgYGNvbXBsZXRlZGAgb3IgYGVycm9yZWRgIGZsYWcuIEhvd2V2ZXIsIHRoZXJlIGFyZSBzb21lIHNpdHVhdGlvbnNcbiAgICAgICAgICAgICAgICAgICAgICAgICogd2hlcmUgd2UgY291bGQgZ2V0IGhlcmUgd2l0aG91dCBlaXRoZXIgb2YgdGhvc2UgYmVpbmcgc2V0LiBGb3IgaW5zdGFuY2UsIGFcbiAgICAgICAgICAgICAgICAgICAgICAgICogcmVkaXJlY3QgZHVyaW5nIE5hdmlnYXRpb25TdGFydC4gVGhlcmVmb3JlLCB0aGlzIGlzIGEgY2F0Y2gtYWxsIHRvIG1ha2VcbiAgICAgICAgICAgICAgICAgICAgICAgICogc3VyZSB0aGUgTmF2aWdhdGlvbkNhbmNlbFxuICAgICAgICAgICAgICAgICAgICAgICAgKiBldmVudCBpcyBmaXJlZCB3aGVuIGEgbmF2aWdhdGlvbiBnZXRzIGNhbmNlbGxlZCBidXQgbm90IGNhdWdodCBieSBvdGhlclxuICAgICAgICAgICAgICAgICAgICAgICAgKiBtZWFucy4gKi9cbiAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFjb21wbGV0ZWQgJiYgIWVycm9yZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjYW5jZWxhdGlvblJlYXNvbiA9IGBOYXZpZ2F0aW9uIElEICR7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQuaWR9IGlzIG5vdCBlcXVhbCB0byB0aGUgY3VycmVudCBuYXZpZ2F0aW9uIGlkICR7dGhpcy5uYXZpZ2F0aW9uSWR9YDtcbiAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5jYW5jZWxlZE5hdmlnYXRpb25SZXNvbHV0aW9uID09PSAncmVwbGFjZScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE11c3QgcmVzZXQgdG8gY3VycmVudCBVUkwgdHJlZSBoZXJlIHRvIGVuc3VyZSBoaXN0b3J5LnN0YXRlIGlzIHNldC4gT25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGEgZnJlc2ggcGFnZSBsb2FkLCBpZiBhIG5ldyBuYXZpZ2F0aW9uIGNvbWVzIGluIGJlZm9yZSBhIHN1Y2Nlc3NmdWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG5hdmlnYXRpb24gY29tcGxldGVzLCB0aGVyZSB3aWxsIGJlIG5vdGhpbmcgaW5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGhpc3Rvcnkuc3RhdGUubmF2aWdhdGlvbklkLiBUaGlzIG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gICAgICAgICAgICAgIC8vIHJlZGlyZWN0IGFuZCBkbyBub3QgcmVzZXQgdGhlIHN0YXRlLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jYW5jZWxOYXZpZ2F0aW9uVHJhbnNpdGlvbih0LCBjYW5jZWxhdGlvblJlYXNvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPKGF0c2NvdHQpOiBUaGUgc2FtZSBwcm9ibGVtIGhhcHBlbnMgaGVyZSB3aXRoIGEgZnJlc2ggcGFnZSBsb2FkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhbmQgYSBuZXcgbmF2aWdhdGlvbiBiZWZvcmUgdGhhdCBjb21wbGV0ZXMgd2hlcmUgd2Ugd29uJ3Qgc2V0IGEgcGFnZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWQuXG4gICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgIC8vIGN1cnJlbnROYXZpZ2F0aW9uIHNob3VsZCBhbHdheXMgYmUgcmVzZXQgdG8gbnVsbCBoZXJlLiBJZiBuYXZpZ2F0aW9uIHdhc1xuICAgICAgICAgICAgICAgICAgICAgICAvLyBzdWNjZXNzZnVsLCBsYXN0U3VjY2Vzc2Z1bFRyYW5zaXRpb24gd2lsbCBoYXZlIGFscmVhZHkgYmVlbiBzZXQuIFRoZXJlZm9yZVxuICAgICAgICAgICAgICAgICAgICAgICAvLyB3ZSBjYW4gc2FmZWx5IHNldCBjdXJyZW50TmF2aWdhdGlvbiB0byBudWxsIGhlcmUuXG4gICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudE5hdmlnYXRpb24gPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICBjYXRjaEVycm9yKChlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgIC8vIFRPRE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NlbmFyaW8uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5hdmlnYXRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc3RvcmVIaXN0b3J5KHQsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuYXZDYW5jZWwgPSBuZXcgTmF2aWdhdGlvbkNhbmNlbChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5pZCwgdGhpcy5zZXJpYWxpemVVcmwodC5leHRyYWN0ZWRVcmwpLCBlLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50c1N1YmplY3QubmV4dChuYXZDYW5jZWwpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2hlbiByZWRpcmVjdGluZywgd2UgbmVlZCB0byBkZWxheSByZXNvbHZpbmcgdGhlIG5hdmlnYXRpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAvLyBwcm9taXNlIGFuZCBwdXNoIGl0IHRvIHRoZSByZWRpcmVjdCBuYXZpZ2F0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFyZWRpcmVjdGluZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5yZXNvbHZlKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2V0VGltZW91dCBpcyByZXF1aXJlZCBzbyB0aGlzIG5hdmlnYXRpb24gZmluaXNoZXMgd2l0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhlIHJldHVybiBFTVBUWSBiZWxvdy4gSWYgaXQgaXNuJ3QgYWxsb3dlZCB0byBmaW5pc2hcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHByb2Nlc3NpbmcsIHRoZXJlIGNhbiBiZSBtdWx0aXBsZSBuYXZpZ2F0aW9ucyB0byB0aGUgc2FtZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVVJMLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1lcmdlZFRyZWUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy51cmxIYW5kbGluZ1N0cmF0ZWd5Lm1lcmdlKGUudXJsLCB0aGlzLnJhd1VybFRyZWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBleHRyYXMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tpcExvY2F0aW9uQ2hhbmdlOiB0LmV4dHJhcy5za2lwTG9jYXRpb25DaGFuZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhlIFVSTCBpcyBhbHJlYWR5IHVwZGF0ZWQgYXQgdGhpcyBwb2ludCBpZiB3ZSBoYXZlICdlYWdlcicgVVJMXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdXBkYXRlcyBvciBpZiB0aGUgbmF2aWdhdGlvbiB3YXMgdHJpZ2dlcmVkIGJ5IHRoZSBicm93c2VyIChiYWNrXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYnV0dG9uLCBVUkwgYmFyLCBldGMpLiBXZSB3YW50IHRvIHJlcGxhY2UgdGhhdCBpdGVtIGluIGhpc3RvcnkgaWZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGUgbmF2aWdhdGlvbiBpcyByZWplY3RlZC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXBsYWNlVXJsOiB0aGlzLnVybFVwZGF0ZVN0cmF0ZWd5ID09PSAnZWFnZXInIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzQnJvd3NlclRyaWdnZXJlZE5hdmlnYXRpb24odC5zb3VyY2UpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zY2hlZHVsZU5hdmlnYXRpb24oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXJnZWRUcmVlLCAnaW1wZXJhdGl2ZScsIG51bGwsIGV4dHJhcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtyZXNvbHZlOiB0LnJlc29sdmUsIHJlamVjdDogdC5yZWplY3QsIHByb21pc2U6IHQucHJvbWlzZX0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgLyogQWxsIG90aGVyIGVycm9ycyBzaG91bGQgcmVzZXQgdG8gdGhlIHJvdXRlcidzIGludGVybmFsIFVSTCByZWZlcmVuY2UgdG9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgKiB0aGUgcHJlLWVycm9yIHN0YXRlLiAqL1xuICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVzdG9yZUhpc3RvcnkodCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmF2RXJyb3IgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXcgTmF2aWdhdGlvbkVycm9yKHQuaWQsIHRoaXMuc2VyaWFsaXplVXJsKHQuZXh0cmFjdGVkVXJsKSwgZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRzU3ViamVjdC5uZXh0KG5hdkVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5yZXNvbHZlKHRoaXMuZXJyb3JIYW5kbGVyKGUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5yZWplY3QoZWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gRU1QVFk7XG4gICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgIC8vIFRPRE8oamFzb25hZGVuKTogcmVtb3ZlIGNhc3Qgb25jZSBnMyBpcyBvbiB1cGRhdGVkIFR5cGVTY3JpcHRcbiAgICAgICAgICAgICAgIH0pKSBhcyBhbnkgYXMgT2JzZXJ2YWJsZTxOYXZpZ2F0aW9uVHJhbnNpdGlvbj47XG4gIH1cblxuICAvKipcbiAgICogQGludGVybmFsXG4gICAqIFRPRE86IHRoaXMgc2hvdWxkIGJlIHJlbW92ZWQgb25jZSB0aGUgY29uc3RydWN0b3Igb2YgdGhlIHJvdXRlciBtYWRlIGludGVybmFsXG4gICAqL1xuICByZXNldFJvb3RDb21wb25lbnRUeXBlKHJvb3RDb21wb25lbnRUeXBlOiBUeXBlPGFueT4pOiB2b2lkIHtcbiAgICB0aGlzLnJvb3RDb21wb25lbnRUeXBlID0gcm9vdENvbXBvbmVudFR5cGU7XG4gICAgLy8gVE9ETzogdnNhdmtpbiByb3V0ZXIgNC4wIHNob3VsZCBtYWtlIHRoZSByb290IGNvbXBvbmVudCBzZXQgdG8gbnVsbFxuICAgIC8vIHRoaXMgd2lsbCBzaW1wbGlmeSB0aGUgbGlmZWN5Y2xlIG9mIHRoZSByb3V0ZXIuXG4gICAgdGhpcy5yb3V0ZXJTdGF0ZS5yb290LmNvbXBvbmVudCA9IHRoaXMucm9vdENvbXBvbmVudFR5cGU7XG4gIH1cblxuICBwcml2YXRlIGdldFRyYW5zaXRpb24oKTogTmF2aWdhdGlvblRyYW5zaXRpb24ge1xuICAgIGNvbnN0IHRyYW5zaXRpb24g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gICAgICAgICAgICBtYXAodCA9PlxuICAgICAgICAgICAgICAgICAgICAgICAoey4uLnQsIGV4dHJhY3RlZFVybDogdGhpcy51cmxIYW5kbGluZ1N0cmF0ZWd5LmV4dHJhY3QodC5yYXdVcmwpfSBhc1xuICAgICAgICAgICAgICAgICAgICAgICAgTmF2aWdhdGlvblRyYW5zaXRpb24pKSxcblxuICAgICAgICAgICAgICAgLy8gVXNpbmcgc3dpdGNoTWFwIHNvIHdlIGNhbmNlbCBleGVjdXRpbmcgbmF2aWdhdGlvbnMgd2hlbiBhIG5ldyBvbmUgY29tZXMgaW5cbiAgICAgICAgICAgICAgIHN3aXRjaE1hcCh0ID0+IHtcbiAgICAgICAgICAgICAgICAgbGV0IGNvbXBsZXRlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICBsZXQgZXJyb3JlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICByZXR1cm4gb2YodCkucGlwZShcbiAgICAgICAgICAgICAgICAgICAgIC8vIFN0b3JlIHRoZSBOYXZpZ2F0aW9uIG9iamVjdFxuICAgICAgICAgICAgICAgICAgICAgdGFwKHQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnROYXZpZ2F0aW9uID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiB0LmlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgIGluaXRpYWxVcmw6IHQuY3VycmVudFJhd1VybCxcbiAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYWN0ZWRVcmw6IHQuZXh0cmFjdGVkVXJsLFxuICAgICAgICAgICAgICAgICAgICAgICAgIHRyaWdnZXI6IHQuc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhczogdC5leHRyYXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNOYXZpZ2F0aW9uOiB0aGlzLmxhc3RTdWNjZXNzZnVsTmF2aWdhdGlvbiA/XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsuLi50aGlzLmxhc3RTdWNjZXNzZnVsTmF2aWdhdGlvbiwgcHJldmlvdXNOYXZpZ2F0aW9uOiBudWxsfSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bGxcbiAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgc3dpdGNoTWFwKHQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBicm93c2VyVXJsVHJlZSA9IHRoaXMuYnJvd3NlclVybFRyZWUudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdXJsVHJhbnNpdGlvbiA9ICF0aGlzLm5hdmlnYXRlZCB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5leHRyYWN0ZWRVcmwudG9TdHJpbmcoKSAhPT0gYnJvd3NlclVybFRyZWUgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5hdmlnYXRpb25zIHdoaWNoIHN1Y2NlZWQgb3Igb25lcyB3aGljaCBmYWlsIGFuZCBhcmUgY2xlYW5lZCB1cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29ycmVjdGx5IHNob3VsZCByZXN1bHQgaW4gYGJyb3dzZXJVcmxUcmVlYCBhbmQgYGN1cnJlbnRVcmxUcmVlYFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbWF0Y2hpbmcuIElmIHRoaXMgaXMgbm90IHRoZSBjYXNlLCBhc3N1bWUgc29tZXRoaW5nIHdlbnQgd3JvbmcgYW5kIHRyeVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcHJvY2Vzc2luZyB0aGUgVVJMIGFnYWluLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJvd3NlclVybFRyZWUgIT09IHRoaXMuY3VycmVudFVybFRyZWUudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJvY2Vzc0N1cnJlbnRVcmwgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRoaXMub25TYW1lVXJsTmF2aWdhdGlvbiA9PT0gJ3JlbG9hZCcgPyB0cnVlIDogdXJsVHJhbnNpdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudXJsSGFuZGxpbmdTdHJhdGVneS5zaG91bGRQcm9jZXNzVXJsKHQucmF3VXJsKTtcblxuXG4gICAgICAgICAgICAgICAgICAgICAgIGlmIChwcm9jZXNzQ3VycmVudFVybCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIHRoZSBzb3VyY2Ugb2YgdGhlIG5hdmlnYXRpb24gaXMgZnJvbSBhIGJyb3dzZXIgZXZlbnQsIHRoZSBVUkwgaXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhbHJlYWR5IHVwZGF0ZWQuIFdlIGFscmVhZHkgbmVlZCB0byBzeW5jIHRoZSBpbnRlcm5hbCBzdGF0ZS5cbiAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNCcm93c2VyVHJpZ2dlcmVkTmF2aWdhdGlvbih0LnNvdXJjZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYnJvd3NlclVybFRyZWUgPSB0LmV4dHJhY3RlZFVybDtcbiAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9mKHQpLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZpcmUgTmF2aWdhdGlvblN0YXJ0IGV2ZW50XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaE1hcCh0ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0cmFuc2l0aW9uID0gdGhpcy50cmFuc2l0aW9ucy5nZXRWYWx1ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50c1N1YmplY3QubmV4dChuZXcgTmF2aWdhdGlvblN0YXJ0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0LmlkLCB0aGlzLnNlcmlhbGl6ZVVybCh0LmV4dHJhY3RlZFVybCksIHQuc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0LnJlc3RvcmVkU3RhdGUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHJhbnNpdGlvbiAhPT0gdGhpcy50cmFuc2l0aW9ucy5nZXRWYWx1ZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gRU1QVFk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBkZWxheSBpcyByZXF1aXJlZCB0byBtYXRjaCBvbGQgYmVoYXZpb3IgdGhhdCBmb3JjZWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBuYXZpZ2F0aW9uIHRvIGFsd2F5cyBiZSBhc3luY1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUodCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFwcGx5UmVkaXJlY3RzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGx5UmVkaXJlY3RzKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5uZ01vZHVsZS5pbmplY3RvciwgdGhpcy5jb25maWdMb2FkZXIsIHRoaXMudXJsU2VyaWFsaXplcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnKSxcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgdGhlIGN1cnJlbnROYXZpZ2F0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcCh0ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnROYXZpZ2F0aW9uID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLi4udGhpcy5jdXJyZW50TmF2aWdhdGlvbiEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaW5hbFVybDogdC51cmxBZnRlclJlZGlyZWN0c1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJlY29nbml6ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWNvZ25pemUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJvb3RDb21wb25lbnRUeXBlLCB0aGlzLmNvbmZpZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1cmwpID0+IHRoaXMuc2VyaWFsaXplVXJsKHVybCksIHRoaXMucGFyYW1zSW5oZXJpdGFuY2VTdHJhdGVneSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVsYXRpdmVMaW5rUmVzb2x1dGlvbiksXG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVXBkYXRlIFVSTCBpZiBpbiBgZWFnZXJgIHVwZGF0ZSBtb2RlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcCh0ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy51cmxVcGRhdGVTdHJhdGVneSA9PT0gJ2VhZ2VyJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF0LmV4dHJhcy5za2lwTG9jYXRpb25DaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRCcm93c2VyVXJsKHQudXJsQWZ0ZXJSZWRpcmVjdHMsIHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPKGF0c2NvdHQpOiBUaGUgYWJvdmUgbGluZSBpcyBpbmNvcnJlY3QuIEl0IHNldHMgdGhlIHVybCB0b1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBvbmx5IHRoZSBwYXJ0IHRoYXQgaXMgaGFuZGxlZCBieSB0aGUgcm91dGVyLiBJdCBzaG91bGQgbWVyZ2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhhdCB3aXRoIHRoZSByYXdVcmwgc28gdGhlIHVybCBpbmNsdWRlcyBzZWdtZW50cyBub3QgaGFuZGxlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBieSB0aGUgcm91dGVyOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgY29uc3QgcmF3VXJsID0gdGhpcy51cmxIYW5kbGluZ1N0cmF0ZWd5Lm1lcmdlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgIHQudXJsQWZ0ZXJSZWRpcmVjdHMsIHQucmF3VXJsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gIHRoaXMuc2V0QnJvd3NlclVybChyYXdVcmwsIHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5icm93c2VyVXJsVHJlZSA9IHQudXJsQWZ0ZXJSZWRpcmVjdHM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRmlyZSBSb3V0ZXNSZWNvZ25pemVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgcm91dGVzUmVjb2duaXplZCA9IG5ldyBSb3V0ZXNSZWNvZ25pemVkKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0LmlkLCB0aGlzLnNlcmlhbGl6ZVVybCh0LmV4dHJhY3RlZFVybCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VyaWFsaXplVXJsKHQudXJsQWZ0ZXJSZWRpcmVjdHMpLCB0LnRhcmdldFNuYXBzaG90ISk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRzU3ViamVjdC5uZXh0KHJvdXRlc1JlY29nbml6ZWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJvY2Vzc1ByZXZpb3VzVXJsID0gdXJsVHJhbnNpdGlvbiAmJiB0aGlzLnJhd1VybFRyZWUgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy51cmxIYW5kbGluZ1N0cmF0ZWd5LnNob3VsZFByb2Nlc3NVcmwodGhpcy5yYXdVcmxUcmVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAvKiBXaGVuIHRoZSBjdXJyZW50IFVSTCBzaG91bGRuJ3QgYmUgcHJvY2Vzc2VkLCBidXQgdGhlIHByZXZpb3VzIG9uZSB3YXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICogd2UgaGFuZGxlIHRoaXMgXCJlcnJvciBjb25kaXRpb25cIiBieSBuYXZpZ2F0aW5nIHRvIHRoZSBwcmV2aW91c2x5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICogc3VjY2Vzc2Z1bCBVUkwsIGJ1dCBsZWF2aW5nIHRoZSBVUkwgaW50YWN0LiovXG4gICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHByb2Nlc3NQcmV2aW91c1VybCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qge2lkLCBleHRyYWN0ZWRVcmwsIHNvdXJjZSwgcmVzdG9yZWRTdGF0ZSwgZXh0cmFzfSA9IHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuYXZTdGFydCA9IG5ldyBOYXZpZ2F0aW9uU3RhcnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQsIHRoaXMuc2VyaWFsaXplVXJsKGV4dHJhY3RlZFVybCksIHNvdXJjZSwgcmVzdG9yZWRTdGF0ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudHNTdWJqZWN0Lm5leHQobmF2U3RhcnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdGFyZ2V0U25hcHNob3QgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZUVtcHR5U3RhdGUoZXh0cmFjdGVkVXJsLCB0aGlzLnJvb3RDb21wb25lbnRUeXBlKS5zbmFwc2hvdDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9mKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLi4udCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0U25hcHNob3QsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybEFmdGVyUmVkaXJlY3RzOiBleHRyYWN0ZWRVcmwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhczogey4uLmV4dHJhcywgc2tpcExvY2F0aW9uQ2hhbmdlOiBmYWxzZSwgcmVwbGFjZVVybDogZmFsc2V9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFdoZW4gbmVpdGhlciB0aGUgY3VycmVudCBvciBwcmV2aW91cyBVUkwgY2FuIGJlIHByb2Nlc3NlZCwgZG8gbm90aGluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICogb3RoZXIgdGhhbiB1cGRhdGUgcm91dGVyJ3MgaW50ZXJuYWwgcmVmZXJlbmNlIHRvIHRoZSBjdXJyZW50IFwic2V0dGxlZFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBVUkwuIFRoaXMgd2F5IHRoZSBuZXh0IG5hdmlnYXRpb24gd2lsbCBiZSBjb21pbmcgZnJvbSB0aGUgY3VycmVudCBVUkxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIGluIHRoZSBicm93c2VyLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJhd1VybFRyZWUgPSB0LnJhd1VybDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYnJvd3NlclVybFRyZWUgPSB0LnVybEFmdGVyUmVkaXJlY3RzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5yZXNvbHZlKG51bGwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEVNUFRZO1xuICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgfSksXG5cbiAgICAgICAgICAgICAgICAgICAgIC8vIEJlZm9yZSBQcmVhY3RpdmF0aW9uXG4gICAgICAgICAgICAgICAgICAgICBzd2l0Y2hUYXAodCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRTbmFwc2hvdCxcbiAgICAgICAgICAgICAgICAgICAgICAgICBpZDogbmF2aWdhdGlvbklkLFxuICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhY3RlZFVybDogYXBwbGllZFVybFRyZWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgcmF3VXJsOiByYXdVcmxUcmVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhczoge3NraXBMb2NhdGlvbkNoYW5nZSwgcmVwbGFjZVVybH1cbiAgICAgICAgICAgICAgICAgICAgICAgfSA9IHQ7XG4gICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmhvb2tzLmJlZm9yZVByZWFjdGl2YXRpb24odGFyZ2V0U25hcHNob3QhLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgbmF2aWdhdGlvbklkLFxuICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGxpZWRVcmxUcmVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgIHJhd1VybFRyZWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgc2tpcExvY2F0aW9uQ2hhbmdlOiAhIXNraXBMb2NhdGlvbkNoYW5nZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICByZXBsYWNlVXJsOiAhIXJlcGxhY2VVcmwsXG4gICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgfSksXG5cbiAgICAgICAgICAgICAgICAgICAgIC8vIC0tLSBHVUFSRFMgLS0tXG4gICAgICAgICAgICAgICAgICAgICB0YXAodCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGd1YXJkc1N0YXJ0ID0gbmV3IEd1YXJkc0NoZWNrU3RhcnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0LmlkLCB0aGlzLnNlcmlhbGl6ZVVybCh0LmV4dHJhY3RlZFVybCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlcmlhbGl6ZVVybCh0LnVybEFmdGVyUmVkaXJlY3RzKSwgdC50YXJnZXRTbmFwc2hvdCEpO1xuICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudChndWFyZHNTdGFydCk7XG4gICAgICAgICAgICAgICAgICAgICB9KSxcblxuICAgICAgICAgICAgICAgICAgICAgbWFwKHQgPT4gKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBndWFyZHM6IGdldEFsbFJvdXRlR3VhcmRzKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQudGFyZ2V0U25hcHNob3QhLCB0LmN1cnJlbnRTbmFwc2hvdCwgdGhpcy5yb290Q29udGV4dHMpXG4gICAgICAgICAgICAgICAgICAgICAgICAgfSkpLFxuXG4gICAgICAgICAgICAgICAgICAgICBjaGVja0d1YXJkcyh0aGlzLm5nTW9kdWxlLmluamVjdG9yLCAoZXZ0OiBFdmVudCkgPT4gdGhpcy50cmlnZ2VyRXZlbnQoZXZ0KSksXG4gICAgICAgICAgICAgICAgICAgICB0YXAodCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgIGlmIChpc1VybFRyZWUodC5ndWFyZHNSZXN1bHQpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZXJyb3I6IEVycm9yJnt1cmw/OiBVcmxUcmVlfSA9IG5hdmlnYXRpb25DYW5jZWxpbmdFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYFJlZGlyZWN0aW5nIHRvIFwiJHt0aGlzLnNlcmlhbGl6ZVVybCh0Lmd1YXJkc1Jlc3VsdCl9XCJgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvci51cmwgPSB0Lmd1YXJkc1Jlc3VsdDtcbiAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGd1YXJkc0VuZCA9IG5ldyBHdWFyZHNDaGVja0VuZChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHQuaWQsIHRoaXMuc2VyaWFsaXplVXJsKHQuZXh0cmFjdGVkVXJsKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VyaWFsaXplVXJsKHQudXJsQWZ0ZXJSZWRpcmVjdHMpLCB0LnRhcmdldFNuYXBzaG90ISxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICEhdC5ndWFyZHNSZXN1bHQpO1xuICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudChndWFyZHNFbmQpO1xuICAgICAgICAgICAgICAgICAgICAgfSksXG5cbiAgICAgICAgICAgICAgICAgICAgIGZpbHRlcih0ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF0Lmd1YXJkc1Jlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVzdG9yZUhpc3RvcnkodCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jYW5jZWxOYXZpZ2F0aW9uVHJhbnNpdGlvbih0LCAnJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgfSksXG5cbiAgICAgICAgICAgICAgICAgICAgIC8vIC0tLSBSRVNPTFZFIC0tLVxuICAgICAgICAgICAgICAgICAgICAgc3dpdGNoVGFwKHQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICBpZiAodC5ndWFyZHMuY2FuQWN0aXZhdGVDaGVja3MubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9mKHQpLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcCh0ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByZXNvbHZlU3RhcnQgPSBuZXcgUmVzb2x2ZVN0YXJ0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0LmlkLCB0aGlzLnNlcmlhbGl6ZVVybCh0LmV4dHJhY3RlZFVybCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VyaWFsaXplVXJsKHQudXJsQWZ0ZXJSZWRpcmVjdHMpLCB0LnRhcmdldFNuYXBzaG90ISk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnQocmVzb2x2ZVN0YXJ0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaE1hcCh0ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVJlc29sdmVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9mKHQpLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVEYXRhKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wYXJhbXNJbmhlcml0YW5jZVN0cmF0ZWd5LCB0aGlzLm5nTW9kdWxlLmluamVjdG9yKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFwKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXh0OiAoKSA9PiBkYXRhUmVzb2x2ZWQgPSB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBsZXRlOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGFSZXNvbHZlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc3RvcmVIaXN0b3J5KHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbmNlbE5hdmlnYXRpb25UcmFuc2l0aW9uKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGBBdCBsZWFzdCBvbmUgcm91dGUgcmVzb2x2ZXIgZGlkbid0IGVtaXQgYW55IHZhbHVlLmApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcCh0ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByZXNvbHZlRW5kID0gbmV3IFJlc29sdmVFbmQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQuaWQsIHRoaXMuc2VyaWFsaXplVXJsKHQuZXh0cmFjdGVkVXJsKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXJpYWxpemVVcmwodC51cmxBZnRlclJlZGlyZWN0cyksIHQudGFyZ2V0U25hcHNob3QhKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudChyZXNvbHZlRW5kKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgICAgICB9KSxcblxuICAgICAgICAgICAgICAgICAgICAgLy8gLS0tIEFGVEVSIFBSRUFDVElWQVRJT04gLS0tXG4gICAgICAgICAgICAgICAgICAgICBzd2l0Y2hUYXAoKHQ6IE5hdmlnYXRpb25UcmFuc2l0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRTbmFwc2hvdCxcbiAgICAgICAgICAgICAgICAgICAgICAgICBpZDogbmF2aWdhdGlvbklkLFxuICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhY3RlZFVybDogYXBwbGllZFVybFRyZWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgcmF3VXJsOiByYXdVcmxUcmVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhczoge3NraXBMb2NhdGlvbkNoYW5nZSwgcmVwbGFjZVVybH1cbiAgICAgICAgICAgICAgICAgICAgICAgfSA9IHQ7XG4gICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmhvb2tzLmFmdGVyUHJlYWN0aXZhdGlvbih0YXJnZXRTbmFwc2hvdCEsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBuYXZpZ2F0aW9uSWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgYXBwbGllZFVybFRyZWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgcmF3VXJsVHJlZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICBza2lwTG9jYXRpb25DaGFuZ2U6ICEhc2tpcExvY2F0aW9uQ2hhbmdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgIHJlcGxhY2VVcmw6ICEhcmVwbGFjZVVybCxcbiAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICB9KSxcblxuICAgICAgICAgICAgICAgICAgICAgbWFwKCh0OiBOYXZpZ2F0aW9uVHJhbnNpdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0YXJnZXRSb3V0ZXJTdGF0ZSA9IGNyZWF0ZVJvdXRlclN0YXRlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yb3V0ZVJldXNlU3RyYXRlZ3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G5cbiAgICAgICAgICAgICAgICAgICAgICAgKHRoaXMgYXMge3JvdXRlclN0YXRlOiBSb3V0ZXJTdGF0ZX0pLnJvdXRlclN0YXRlID0gdC50YXJnZXRSb3V0ZXJTdGF0ZSE7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMudXJsVXBkYXRlU3RyYXRlZ3kgPT09ICdkZWZlcnJlZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXQuZXh0cmFzLnNraXBMb2NhdGlvbkNoYW5nZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRCcm93c2VyVXJsKHRoaXMucmF3VXJsVHJlZSwgdCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYnJvd3NlclVybFRyZWUgPSB0LnVybEFmdGVyUmVkaXJlY3RzO1xuICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICB9KSxcblxuICAgICAgICAgICAgICAgICAgICAgYWN0aXZhdGVSb3V0ZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yb290Q29udGV4dHMsIHRoaXMucm91dGVSZXVzZVN0cmF0ZWd5LFxuICAgICAgICAgICAgICAgICAgICAgICAgIChldnQ6IEV2ZW50KSA9PiB0aGlzLnRyaWdnZXJFdmVudChldnQpKSxcblxuICAgICAgICAgICAgICAgICAgICAgdGFwKHtcbiAgICAgICAgICAgICAgICAgICAgICAgbmV4dCgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgIGZpbmFsaXplKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgLyogV2hlbiB0aGUgbmF2aWdhdGlvbiBzdHJlYW0gZmluaXNoZXMgZWl0aGVyIHRocm91Z2ggZXJyb3Igb3Igc3VjY2Vzcywgd2VcbiAgICAgICAgICAgICAgICAgICAgICAgICogc2V0IHRoZSBgY29tcGxldGVkYCBvciBgZXJyb3JlZGAgZmxhZy4gSG93ZXZlciwgdGhlcmUgYXJlIHNvbWUgc2l0dWF0aW9uc1xuICAgICAgICAgICAgICAgICAgICAgICAgKiB3aGVyZSB3ZSBjb3VsZCBnZXQgaGVyZSB3aXRob3V0IGVpdGhlciBvZiB0aG9zZSBiZWluZyBzZXQuIEZvciBpbnN0YW5jZSwgYVxuICAgICAgICAgICAgICAgICAgICAgICAgKiByZWRpcmVjdCBkdXJpbmcgTmF2aWdhdGlvblN0YXJ0LiBUaGVyZWZvcmUsIHRoaXMgaXMgYSBjYXRjaC1hbGwgdG8gbWFrZVxuICAgICAgICAgICAgICAgICAgICAgICAgKiBzdXJlIHRoZSBOYXZpZ2F0aW9uQ2FuY2VsXG4gICAgICAgICAgICAgICAgICAgICAgICAqIGV2ZW50IGlzIGZpcmVkIHdoZW4gYSBuYXZpZ2F0aW9uIGdldHMgY2FuY2VsbGVkIGJ1dCBub3QgY2F1Z2h0IGJ5IG90aGVyXG4gICAgICAgICAgICAgICAgICAgICAgICAqIG1lYW5zLiAqL1xuICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWNvbXBsZXRlZCAmJiAhZXJyb3JlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNhbmNlbGF0aW9uUmVhc29uID0gYE5hdmlnYXRpb24gSUQgJHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5pZH0gaXMgbm90IGVxdWFsIHRvIHRoZSBjdXJyZW50IG5hdmlnYXRpb24gaWQgJHt0aGlzLm5hdmlnYXRpb25JZH1gO1xuICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmNhbmNlbGVkTmF2aWdhdGlvblJlc29sdXRpb24gPT09ICdyZXBsYWNlJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTXVzdCByZXNldCB0byBjdXJyZW50IFVSTCB0cmVlIGhlcmUgdG8gZW5zdXJlIGhpc3Rvcnkuc3RhdGUgaXMgc2V0LiBPblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYSBmcmVzaCBwYWdlIGxvYWQsIGlmIGEgbmV3IG5hdmlnYXRpb24gY29tZXMgaW4gYmVmb3JlIGEgc3VjY2Vzc2Z1bFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbmF2aWdhdGlvbiBjb21wbGV0ZXMsIHRoZXJlIHdpbGwgYmUgbm90aGluZyBpblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaGlzdG9yeS5zdGF0ZS5uYXZpZ2F0aW9uSWQuIFRoaXMgY2FuIGNhdXNlIHN5bmMgcHJvYmxlbXMgd2l0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQW5ndWxhckpTIHN5bmMgY29kZSB3aGljaCBsb29rcyBmb3IgYSB2YWx1ZSBoZXJlIGluIG9yZGVyIHRvIGRldGVybWluZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gd2hldGhlciBvciBub3QgdG8gaGFuZGxlIGEgZ2l2ZW4gcG9wc3RhdGUgZXZlbnQgb3IgdG8gbGVhdmUgaXQgdG8gdGhlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBBbmd1bGFyIHJvdXRlci5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVzdG9yZUhpc3RvcnkodCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbmNlbE5hdmlnYXRpb25UcmFuc2l0aW9uKHQsIGNhbmNlbGF0aW9uUmVhc29uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2UgY2Fubm90IHRyaWdnZXIgYSBgbG9jYXRpb24uaGlzdG9yeUdvYCBpZiB0aGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNhbmNlbGxhdGlvbiB3YXMgZHVlIHRvIGEgbmV3IG5hdmlnYXRpb24gYmVmb3JlIHRoZSBwcmV2aW91cyBjb3VsZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29tcGxldGUuIFRoaXMgaXMgYmVjYXVzZSBgbG9jYXRpb24uaGlzdG9yeUdvYCB0cmlnZ2VycyBhIGBwb3BzdGF0ZWBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdoaWNoIHdvdWxkIGFsc28gdHJpZ2dlciBhbm90aGVyIG5hdmlnYXRpb24uIEluc3RlYWQsIHRyZWF0IHRoaXMgYXMgYVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVkaXJlY3QgYW5kIGRvIG5vdCByZXNldCB0aGUgc3RhdGUuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbmNlbE5hdmlnYXRpb25UcmFuc2l0aW9uKHQsIGNhbmNlbGF0aW9uUmVhc29uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRPRE8oYXRzY290dCk6IFRoZSBzYW1lIHByb2JsZW0gaGFwcGVucyBoZXJlIHdpdGggYSBmcmVzaCBwYWdlIGxvYWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFuZCBhIG5ldyBuYXZpZ2F0aW9uIGJlZm9yZSB0aGF0IGNvbXBsZXRlcyB3aGVyZSB3ZSB3b24ndCBzZXQgYSBwYWdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZC5cbiAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgLy8gT25seSBjbGVhciBjdXJyZW50IG5hdmlnYXRpb24gaWYgaXQgaXMgc3RpbGwgc2V0IHRvIHRoZSBvbmUgdGhhdFxuICAgICAgICAgICAgICAgICAgICAgICAvLyBmaW5hbGl6ZWQuXG4gICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmN1cnJlbnROYXZpZ2F0aW9uPy5pZCA9PT0gdC5pZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudE5hdmlnYXRpb24gPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgIGNhdGNoRXJyb3IoKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgLy8gVE9ETyhhdHNjb3R0KTogVGhlIE5hdmlnYXRpb25UcmFuc2l0aW9uIGB0YCB1c2VkIGhlcmUgZG9lcyBub3QgYWNjdXJhdGVseVxuICAgICAgICAgICAgICAgICAgICAgICAvLyByZWZsZWN0IHRoZSBjdXJyZW50IHN0YXRlIG9mIHRoZSB3aG9sZSB0cmFuc2l0aW9uIGJlY2F1c2Ugc29tZSBvcGVyYXRpb25zXG4gICAgICAgICAgICAgICAgICAgICAgIC8vIHJldHVybiBhIG5ldyBvYmplY3QgcmF0aGVyIHRoYW4gbW9kaWZ5aW5nIHRoZSBvbmUgaW4gdGhlIG91dGVybW9zdFxuICAgICAgICAgICAgICAgICAgICAgICAvLyBgc3dpdGNoTWFwYC5cbiAgICAgICAgICAgICAgICAgICAgICAgLy8gIFRoZSBmaXggY2FuIGxpa2VseSBiZSB0bzpcbiAgICAgICAgICAgICAgICAgICAgICAgLy8gIDEuIFJlbmFtZSB0aGUgb3V0ZXIgYHRgIHZhcmlhYmxlIHNvIGl0J3Mgbm90IHNoYWRvd2VkIGFsbCB0aGUgdGltZSBhbmRcbiAgICAgICAgICAgICAgICAgICAgICAgLy8gIGNvbmZ1c2luZ1xuICAgICAgICAgICAgICAgICAgICAgICAvLyAgMi4gS2VlcCByZWFzc2lnbmluZyB0byB0aGUgb3V0ZXIgdmFyaWFibGUgYWZ0ZXIgZWFjaCBzdGFnZSB0byBlbnN1cmUgaXRcbiAgICAgICAgICAgICAgICAgICAgICAgLy8gIGdldHMgdXBkYXRlZC4gT3IgY2hhbmdlIHRoZSBpbXBsZW1lbnRhdGlvbnMgdG8gbm90IHJldHVybiBhIGNvcHkuXG4gICAgICAgICAgICAgICAgICAgICAgIC8vIE5vdCBjaGFuZ2VkIHlldCBiZWNhdXNlIGl0IGFmZmVjdHMgZXhpc3RpbmcgY29kZSBhbmQgd291bGQgbmVlZCB0byBiZVxuICAgICAgICAgICAgICAgICAgICAgICAvLyB0ZXN0ZWQgbW9yZSB0aG9yb3VnaGx5LlxuICAgICAgICAgICAgICAgICAgICAgICBlcnJvcmVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgLyogVGhpcyBlcnJvciB0eXBlIGlzIGlzc3VlZCBkdXJpbmcgUmVkaXJlY3QsIGFuZCBpcyBoYW5kbGVkIGFzIGFcbiAgICAgICAgICAgICAgICAgICAgICAgICogY2FuY2VsbGF0aW9uIHJhdGhlciB0aGFuIGFuIGVycm9yLiAqL1xuICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNOYXZpZ2F0aW9uQ2FuY2VsaW5nRXJyb3IoZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByZWRpcmVjdGluZyA9IGlzVXJsVHJlZShlLnVybCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFyZWRpcmVjdGluZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2V0IHByb3BlcnR5IG9ubHkgaWYgd2UncmUgbm90IHJlZGlyZWN0aW5nLiBJZiB3ZSBsYW5kZWQgb24gYSBwYWdlIGFuZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVkaXJlY3QgdG8gYC9gIHJvdXRlLCB0aGUgbmV3IG5hdmlnYXRpb24gaXMgZ29pbmcgdG8gc2VlIHRoZSBgL2BcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlzbid0IGEgY2hhbmdlIGZyb20gdGhlIGRlZmF1bHQgY3VycmVudFVybFRyZWUgYW5kIHdvbid0IG5hdmlnYXRlLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBpcyBvbmx5IGFwcGxpY2FibGUgd2l0aCBpbml0aWFsIG5hdmlnYXRpb24sIHNvIHNldHRpbmdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGBuYXZpZ2F0ZWRgIG9ubHkgd2hlbiBub3QgcmVkaXJlY3RpbmcgcmVzb2x2ZXMgdGhpcyBzY2VuYXJpby5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubmF2aWdhdGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVzdG9yZUhpc3RvcnkodCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5hdkNhbmNlbCA9IG5ldyBOYXZpZ2F0aW9uQ2FuY2VsKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0LmlkLCB0aGlzLnNlcmlhbGl6ZVVybCh0LmV4dHJhY3RlZFVybCksIGUubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRzU3ViamVjdC5uZXh0KG5hdkNhbmNlbCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAvLyBXaGVuIHJlZGlyZWN0aW5nLCB3ZSBuZWVkIHRvIGRlbGF5IHJlc29sdmluZyB0aGUgbmF2aWdhdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHByb21pc2UgYW5kIHB1c2ggaXQgdG8gdGhlIHJlZGlyZWN0IG5hdmlnYXRpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXJlZGlyZWN0aW5nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0LnJlc29sdmUoZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXRUaW1lb3V0IGlzIHJlcXVpcmVkIHNvIHRoaXMgbmF2aWdhdGlvbiBmaW5pc2hlcyB3aXRoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGUgcmV0dXJuIEVNUFRZIGJlbG93LiBJZiBpdCBpc24ndCBhbGxvd2VkIHRvIGZpbmlzaFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcHJvY2Vzc2luZywgdGhlcmUgY2FuIGJlIG11bHRpcGxlIG5hdmlnYXRpb25zIHRvIHRoZSBzYW1lXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBVUkwuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbWVyZ2VkVHJlZSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVybEhhbmRsaW5nU3RyYXRlZ3kubWVyZ2UoZS51cmwsIHRoaXMucmF3VXJsVHJlZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGV4dHJhcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2lwTG9jYXRpb25DaGFuZ2U6IHQuZXh0cmFzLnNraXBMb2NhdGlvbkNoYW5nZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgVVJMIGlzIGFscmVhZHkgdXBkYXRlZCBhdCB0aGlzIHBvaW50IGlmIHdlIGhhdmUgJ2VhZ2VyJyBVUkxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB1cGRhdGVzIG9yIGlmIHRoZSBuYXZpZ2F0aW9uIHdhcyB0cmlnZ2VyZWQgYnkgdGhlIGJyb3dzZXIgKGJhY2tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBidXR0b24sIFVSTCBiYXIsIGV0YykuIFdlIHdhbnQgdG8gcmVwbGFjZSB0aGF0IGl0ZW0gaW4gaGlzdG9yeSBpZlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoZSBuYXZpZ2F0aW9uIGlzIHJlamVjdGVkLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcGxhY2VVcmw6IHRoaXMudXJsVXBkYXRlU3RyYXRlZ3kgPT09ICdlYWdlcicgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNCcm93c2VyVHJpZ2dlcmVkTmF2aWdhdGlvbih0LnNvdXJjZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNjaGVkdWxlTmF2aWdhdGlvbihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lcmdlZFRyZWUsICdpbXBlcmF0aXZlJywgbnVsbCwgZXh0cmFzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3Jlc29sdmU6IHQucmVzb2x2ZSwgcmVqZWN0OiB0LnJlamVjdCwgcHJvbWlzZTogdC5wcm9taXNlfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAvKiBBbGwgb3RoZXIgZXJyb3JzIHNob3VsZCByZXNldCB0byB0aGUgcm91dGVyJ3MgaW50ZXJuYWwgVVJMIHJlZmVyZW5jZSB0b1xuICAgICAgICAgICAgICAgICAgICAgICAgICAqIHRoZSBwcmUtZXJyb3Igc3RhdGUuICovXG4gICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXN0b3JlSGlzdG9yeSh0LCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuYXZFcnJvciA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBOYXZpZ2F0aW9uRXJyb3IodC5pZCwgdGhpcy5zZXJpYWxpemVVcmwodC5leHRyYWN0ZWRVcmwpLCBlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICBldmVudHNTdWJqZWN0Lm5leHQobmF2RXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0LnJlc29sdmUodGhpcy5lcnJvckhhbmRsZXIoZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0LnJlamVjdChlZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBFTVBUWTtcbiAgICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgLy8gVE9ETyhqYXNvbmFkZW4pOiByZW1vdmUgY2FzdCBvbmNlIGczIGlzIG9uIHVwZGF0ZWQgVHlwZVNjcmlwdFxuICAgICAgICAgICAgICAgfSkpIGFzIGFueSBhcyBPYnNlcnZhYmxlPE5hdmlnYXRpb25UcmFuc2l0aW9uPjtcbiAgfVxuXG4gIC8qKlxuICAgKiBAaW50ZXJuYWxcbiAgICogVE9ETzogdGhpcyBzaG91bGQgYmUgcmVtb3ZlZCBvbmNlIHRoZSBjb25zdHJ1Y3RvciBvZiB0aGUgcm91dGVyIG1hZGUgaW50ZXJuYWxcbiAgICovXG4gIHJlc2V0Um9vdENvbXBvbmVudFR5cGUocm9vdENvbXB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MubGVuZ3RoOyBpKyspIHtcbiAgICBjb25zdCBjbWQgPSBjb21tYW5kc1tpXTtcbiAgICBpZiAoY21kID09IG51bGwpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgVGhlIHJlcXVlc3RlZCBwYXRoIGNvbnRhaW5zICR7Y21kfSBzZWdtZW50IGF0IGluZGV4ICR7aX1gKTtcbiAgICB9XG4gIH1cbn1cblxuZnVuY3Rpb24gaXNCcm93c2VyVHJpZ2dlcmVkTmF2aWdhdGlvbihzb3VyY2U6ICdpbXBlcmF0aXZlJ3wncG9wc3RhdGUnfCdoYXNoY2hhbmdlJykge1xuICByZXR1cm4gc291cmNlICE9PSAnaW1wZXJhdGl2ZSc7XG59XG4iXX0=
Index: trip-planner-front/node_modules/@angular/router/esm2015/src/version.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/esm2015/src/version.js	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/esm2015/src/version.js	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -15,4 +15,4 @@
  * @publicApi
  */
-export const VERSION = new Version('12.2.9');
+export const VERSION = new Version('12.2.13');
 //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3JvdXRlci9zcmMvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSDs7OztHQUlHO0FBRUgsT0FBTyxFQUFDLE9BQU8sRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUV0Qzs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbi8qKlxuICogQG1vZHVsZVxuICogQGRlc2NyaXB0aW9uXG4gKiBFbnRyeSBwb2ludCBmb3IgYWxsIHB1YmxpYyBBUElzIG9mIHRoZSByb3V0ZXIgcGFja2FnZS5cbiAqL1xuXG5pbXBvcnQge1ZlcnNpb259IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG4vKipcbiAqIEBwdWJsaWNBcGlcbiAqL1xuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBuZXcgVmVyc2lvbignMC4wLjAtUExBQ0VIT0xERVInKTtcbiJdfQ==
Index: trip-planner-front/node_modules/@angular/router/fesm2015/router.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/fesm2015/router.js	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/fesm2015/router.js	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
@@ -4225,4 +4225,5 @@
                 }
             }), finalize(() => {
+                var _a;
                 /* When the navigation stream finishes either through error or success, we
                  * set the `completed` or `errored` flag. However, there are some situations
@@ -4257,8 +4258,9 @@
                     }
                 }
-                // currentNavigation should always be reset to null here. If navigation was
-                // successful, lastSuccessfulTransition will have already been set. Therefore
-                // we can safely set currentNavigation to null here.
-                this.currentNavigation = null;
+                // Only clear current navigation if it is still set to the one that
+                // finalized.
+                if (((_a = this.currentNavigation) === null || _a === void 0 ? void 0 : _a.id) === t.id) {
+                    this.currentNavigation = null;
+                }
             }), catchError((e) => {
                 // TODO(atscott): The NavigationTransition `t` used here does not accurately
@@ -6095,5 +6097,5 @@
  * @publicApi
  */
-const VERSION = new Version('12.2.9');
+const VERSION = new Version('12.2.13');
 
 /**
Index: trip-planner-front/node_modules/@angular/router/fesm2015/router.js.map
===================================================================
--- trip-planner-front/node_modules/@angular/router/fesm2015/router.js.map	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/fesm2015/router.js.map	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,1 +1,1 @@
-{"version":3,"file":"router.js","sources":["../../../../../../packages/router/src/events.ts","../../../../../../packages/router/src/shared.ts","../../../../../../packages/router/src/utils/collection.ts","../../../../../../packages/router/src/url_tree.ts","../../../../../../packages/router/src/utils/tree.ts","../../../../../../packages/router/src/router_state.ts","../../../../../../packages/router/src/create_router_state.ts","../../../../../../packages/router/src/create_url_tree.ts","../../../../../../packages/router/src/operators/activate_routes.ts","../../../../../../packages/router/src/config.ts","../../../../../../packages/router/src/utils/type_guards.ts","../../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../../packages/router/src/components/empty_outlet.ts","../../../../../../packages/router/src/utils/config.ts","../../../../../../packages/router/src/utils/config_matching.ts","../../../../../../packages/router/src/apply_redirects.ts","../../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../../packages/router/src/utils/preactivation.ts","../../../../../../packages/router/src/operators/check_guards.ts","../../../../../../packages/router/src/recognize.ts","../../../../../../packages/router/src/operators/recognize.ts","../../../../../../packages/router/src/operators/resolve_data.ts","../../../../../../packages/router/src/operators/switch_tap.ts","../../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../../packages/router/src/router_config_loader.ts","../../../../../../packages/router/src/router_outlet_context.ts","../../../../../../packages/router/src/url_handling_strategy.ts","../../../../../../packages/router/src/router.ts","../../../../../../packages/router/src/directives/router_link.ts","../../../../../../packages/router/src/directives/router_link_active.ts","../../../../../../packages/router/src/directives/router_outlet.ts","../../../../../../packages/router/src/router_preloader.ts","../../../../../../packages/router/src/router_scroller.ts","../../../../../../packages/router/src/router_module.ts","../../../../../../packages/router/src/version.ts","../../../../../../packages/router/src/private_export.ts","../../../../../../packages/router/src/index.ts","../../../../../../packages/router/public_api.ts","../../../../../../packages/router/index.ts","../../../../../../packages/router/router.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * Identifies the call or event that triggered a navigation.\n *\n * * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.\n * * 'popstate' : Triggered by a `popstate` event.\n * * 'hashchange'-: Triggered by a `hashchange` event.\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative'|'popstate'|'hashchange';\n\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n *   constructor(public router: Router) {\n *     router.events.pipe(\n *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n *     ).subscribe((e: RouterEvent) => {\n *       // Do something\n *     });\n *   }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router-reference#router-events)\n * @publicApi\n */\nexport class RouterEvent {\n  constructor(\n      /** A unique ID that the router assigns to every router navigation. */\n      public id: number,\n      /** The URL that is the destination for this navigation. */\n      public url: string) {}\n}\n\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n  /**\n   * Identifies the call or event that triggered the navigation.\n   * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n   *\n   * @see `NavigationEnd`\n   * @see `NavigationCancel`\n   * @see `NavigationError`\n   */\n  navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n  /**\n   * The navigation state that was previously supplied to the `pushState` call,\n   * when the navigation is triggered by a `popstate` event. Otherwise null.\n   *\n   * The state object is defined by `NavigationExtras`, and contains any\n   * developer-defined state value, as well as a unique ID that\n   * the router assigns to every router transition/navigation.\n   *\n   * From the perspective of the router, the router never \"goes back\".\n   * When the user clicks on the back button in the browser,\n   * a new navigation ID is created.\n   *\n   * Use the ID in this previous-state object to differentiate between a newly created\n   * state and one returned to by a `popstate` event, so that you can restore some\n   * remembered state, such as scroll position.\n   *\n   */\n  restoredState?: {[k: string]: any, navigationId: number}|null;\n\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n      /** @docsNotRequired */\n      restoredState: {[k: string]: any, navigationId: number}|null = null) {\n    super(id, url);\n    this.navigationTrigger = navigationTrigger;\n    this.restoredState = restoredState;\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public reason: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationCancel`\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public error: any) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n  }\n}\n\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot,\n      /** @docsNotRequired */\n      public shouldActivate: boolean) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see `ResolveEnd`\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadStart(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadEnd(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see  `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart`\n * @publicApi\n */\nexport class ChildActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nexport class Scroll {\n  constructor(\n      /** @docsNotRequired */\n      readonly routerEvent: NavigationEnd,\n\n      /** @docsNotRequired */\n      readonly position: [number, number]|null,\n\n      /** @docsNotRequired */\n      readonly anchor: string|null) {}\n\n  toString(): string {\n    const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n    return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n  }\n}\n\n/**\n * Router events that allow you to track the lifecycle of the router.\n *\n * The events occur in the following sequence:\n *\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\n * the router [lazy loads](/guide/router#lazy-loading) a route configuration.\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\n * and the routes are recognized.\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\n * phase of routing.\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\n * begins activating a route's children.\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\n * phase of routing successfully.\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\n * phase of routing.\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\n * phase of routing successfully.\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\n * activating a route's children.\n * * [ActivationEnd](api/router/ActivationEnd): When the router finishes activating a route.\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\n * * [NavigationError](api/router/NavigationError): When navigation fails\n * due to an unexpected error.\n * * [Scroll](api/router/Scroll): When the user scrolls.\n *\n * @publicApi\n */\nexport type Event = RouterEvent|RouteConfigLoadStart|RouteConfigLoadEnd|ChildActivationStart|\n    ChildActivationEnd|ActivationStart|ActivationEnd|Scroll;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of matrix and query URL parameters.\n * @see `convertToParamMap()`\n * @see `ParamMap`\n *\n * @publicApi\n */\nexport type Params = {\n  [key: string]: any;\n};\n\n/**\n * A map that provides access to the required and optional parameters\n * specific to a route.\n * The map supports retrieving a single value with `get()`\n * or multiple values with `getAll()`.\n *\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n *\n * @publicApi\n */\nexport interface ParamMap {\n  /**\n   * Reports whether the map contains a given parameter.\n   * @param name The parameter name.\n   * @returns True if the map contains the given parameter, false otherwise.\n   */\n  has(name: string): boolean;\n  /**\n   * Retrieves a single value for a parameter.\n   * @param name The parameter name.\n   * @return The parameter's single value,\n   * or the first value if the parameter has multiple values,\n   * or `null` when there is no such parameter.\n   */\n  get(name: string): string|null;\n  /**\n   * Retrieves multiple values for a parameter.\n   * @param name The parameter name.\n   * @return An array containing one or more values,\n   * or an empty array if there is no such parameter.\n   *\n   */\n  getAll(name: string): string[];\n\n  /** Names of the parameters in the map. */\n  readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n  private params: Params;\n\n  constructor(params: Params) {\n    this.params = params || {};\n  }\n\n  has(name: string): boolean {\n    return Object.prototype.hasOwnProperty.call(this.params, name);\n  }\n\n  get(name: string): string|null {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v[0] : v;\n    }\n\n    return null;\n  }\n\n  getAll(name: string): string[] {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v : [v];\n    }\n\n    return [];\n  }\n\n  get keys(): string[] {\n    return Object.keys(this.params);\n  }\n}\n\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n  return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n  const error = Error('NavigationCancelingError: ' + message);\n  (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n  return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n  return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n    segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n  const parts = route.path!.split('/');\n\n  if (parts.length > segments.length) {\n    // The actual URL is shorter than the config, no match\n    return null;\n  }\n\n  if (route.pathMatch === 'full' &&\n      (segmentGroup.hasChildren() || parts.length < segments.length)) {\n    // The config is longer than the actual URL but we are looking for a full match, return null\n    return null;\n  }\n\n  const posParams: {[key: string]: UrlSegment} = {};\n\n  // Check each config part against the actual URL\n  for (let index = 0; index < parts.length; index++) {\n    const part = parts[index];\n    const segment = segments[index];\n    const isParameter = part.startsWith(':');\n    if (isParameter) {\n      posParams[part.substring(1)] = segment;\n    } else if (part !== segment.path) {\n      // The actual URL part does not match the config, no match\n      return null;\n    }\n  }\n\n  return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {from, Observable, of} from 'rxjs';\n\nimport {Params} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; ++i) {\n    if (!shallowEqual(a[i], b[i])) return false;\n  }\n  return true;\n}\n\nexport function shallowEqual(a: Params, b: Params): boolean {\n  // While `undefined` should never be possible, it would sometimes be the case in IE 11\n  // and pre-chromium Edge. The check below accounts for this edge case.\n  const k1 = a ? Object.keys(a) : undefined;\n  const k2 = b ? Object.keys(b) : undefined;\n  if (!k1 || !k2 || k1.length != k2.length) {\n    return false;\n  }\n  let key: string;\n  for (let i = 0; i < k1.length; i++) {\n    key = k1[i];\n    if (!equalArraysOrString(a[key], b[key])) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Test equality for arrays of strings or a string.\n */\nexport function equalArraysOrString(a: string|string[], b: string|string[]) {\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    const aSorted = [...a].sort();\n    const bSorted = [...b].sort();\n    return aSorted.every((val, index) => bSorted[index] === val);\n  } else {\n    return a === b;\n  }\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n  return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n  return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n  return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n  for (const prop in map) {\n    if (map.hasOwnProperty(prop)) {\n      callback(map[prop], prop);\n    }\n  }\n}\n\nexport function wrapIntoObservable<T>(value: T|Promise<T>|Observable<T>): Observable<T> {\n  if (isObservable(value)) {\n    return value;\n  }\n\n  if (isPromise(value)) {\n    // Use `Promise.resolve()` to wrap promise-like instances.\n    // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n    // change detection.\n    return from(Promise.resolve(value));\n  }\n\n  return of(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalArraysOrString, forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n  return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\n/**\n * A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`\n * for the current router state.\n *\n * @publicApi\n * @see Router.isActive\n */\nexport interface IsActiveMatchOptions {\n  /**\n   * Defines the strategy for comparing the matrix parameters of two `UrlTree`s.\n   *\n   * The matrix parameter matching is dependent on the strategy for matching the\n   * segments. That is, if the `paths` option is set to `'subset'`, only\n   * the matrix parameters of the matching segments will be compared.\n   *\n   * - `'exact'`: Requires that matching segments also have exact matrix parameter\n   * matches.\n   * - `'subset'`: The matching segments in the router's active `UrlTree` may contain\n   * extra matrix parameters, but those that exist in the `UrlTree` in question must match.\n   * - `'ignored'`: When comparing `UrlTree`s, matrix params will be ignored.\n   */\n  matrixParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the query parameters of two `UrlTree`s.\n   *\n   * - `'exact'`: the query parameters must match exactly.\n   * - `'subset'`: the active `UrlTree` may contain extra parameters,\n   * but must match the key and value of any that exist in the `UrlTree` in question.\n   * - `'ignored'`: When comparing `UrlTree`s, query params will be ignored.\n   */\n  queryParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the `UrlSegment`s of the `UrlTree`s.\n   *\n   * - `'exact'`: all segments in each `UrlTree` must match.\n   * - `'subset'`: a `UrlTree` will be determined to be active if it\n   * is a subtree of the active route. That is, the active route may contain extra\n   * segments, but must at least have all the segements of the `UrlTree` in question.\n   */\n  paths: 'exact'|'subset';\n  /**\n   * - 'exact'`: indicates that the `UrlTree` fragments must be equal.\n   * - `'ignored'`: the fragments will not be compared when determining if a\n   * `UrlTree` is active.\n   */\n  fragment: 'exact'|'ignored';\n}\n\ntype ParamMatchOptions = 'exact'|'subset'|'ignored';\n\ntype PathCompareFn =\n    (container: UrlSegmentGroup, containee: UrlSegmentGroup, matrixParams: ParamMatchOptions) =>\n        boolean;\ntype ParamCompareFn = (container: Params, containee: Params) => boolean;\n\nconst pathCompareMap: Record<IsActiveMatchOptions['paths'], PathCompareFn> = {\n  'exact': equalSegmentGroups,\n  'subset': containsSegmentGroup,\n};\nconst paramCompareMap: Record<ParamMatchOptions, ParamCompareFn> = {\n  'exact': equalParams,\n  'subset': containsParams,\n  'ignored': () => true,\n};\n\nexport function containsTree(\n    container: UrlTree, containee: UrlTree, options: IsActiveMatchOptions): boolean {\n  return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) &&\n      paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) &&\n      !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\n\nfunction equalParams(container: Params, containee: Params): boolean {\n  // TODO: This does not handle array params correctly.\n  return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  if (!equalPath(container.segments, containee.segments)) return false;\n  if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n    return false;\n  }\n  if (container.numberOfChildren !== containee.numberOfChildren) return false;\n  for (const c in containee.children) {\n    if (!container.children[c]) return false;\n    if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n      return false;\n  }\n  return true;\n}\n\nfunction containsParams(container: Params, containee: Params): boolean {\n  return Object.keys(containee).length <= Object.keys(container).length &&\n      Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\n\nfunction containsSegmentGroup(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\n\nfunction containsSegmentGroupHelper(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[],\n    matrixParams: ParamMatchOptions): boolean {\n  if (container.segments.length > containeePaths.length) {\n    const current = container.segments.slice(0, containeePaths.length);\n    if (!equalPath(current, containeePaths)) return false;\n    if (containee.hasChildren()) return false;\n    if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n    return true;\n\n  } else if (container.segments.length === containeePaths.length) {\n    if (!equalPath(container.segments, containeePaths)) return false;\n    if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n    for (const c in containee.children) {\n      if (!container.children[c]) return false;\n      if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n        return false;\n      }\n    }\n    return true;\n\n  } else {\n    const current = containeePaths.slice(0, container.segments.length);\n    const next = containeePaths.slice(container.segments.length);\n    if (!equalPath(container.segments, current)) return false;\n    if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n    if (!container.children[PRIMARY_OUTLET]) return false;\n    return containsSegmentGroupHelper(\n        container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n  }\n}\n\nfunction matrixParamsMatch(\n    containerPaths: UrlSegment[], containeePaths: UrlSegment[], options: ParamMatchOptions) {\n  return containeePaths.every((containeeSegment, i) => {\n    return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n  });\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree =\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n *     const f = tree.fragment; // return 'fragment'\n *     const q = tree.queryParams; // returns {debug: 'true'}\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n *     g.children['support'].segments; // return 1 segment 'help'\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The root segment group of the URL tree */\n      public root: UrlSegmentGroup,\n      /** The query params of the URL */\n      public queryParams: Params,\n      /** The fragment of the URL */\n      public fragment: string|null) {}\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return DEFAULT_SERIALIZER.serialize(this);\n  }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n  /** @internal */\n  _sourceSegment?: UrlSegmentGroup;\n  /** @internal */\n  _segmentIndexShift?: number;\n  /** The parent node in the url tree */\n  parent: UrlSegmentGroup|null = null;\n\n  constructor(\n      /** The URL segments of this group. See `UrlSegment` for more information */\n      public segments: UrlSegment[],\n      /** The list of children of this group */\n      public children: {[key: string]: UrlSegmentGroup}) {\n    forEach(children, (v: any, k: any) => v.parent = this);\n  }\n\n  /** Whether the segment has child segments */\n  hasChildren(): boolean {\n    return this.numberOfChildren > 0;\n  }\n\n  /** Number of child segments */\n  get numberOfChildren(): number {\n    return Object.keys(this.children).length;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePaths(this);\n  }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments;\n *     s[0].path; // returns 'team'\n *     s[0].parameters; // returns {id: 33}\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _parameterMap!: ParamMap;\n\n  constructor(\n      /** The path part of a URL segment */\n      public path: string,\n\n      /** The matrix parameters associated with a segment */\n      public parameters: {[name: string]: string}) {}\n\n  get parameterMap() {\n    if (!this._parameterMap) {\n      this._parameterMap = convertToParamMap(this.parameters);\n    }\n    return this._parameterMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePath(this);\n  }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  if (as.length !== bs.length) return false;\n  return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n    segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n  let res: T[] = [];\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet === PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet !== PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n  /** Parse a url into a `UrlTree` */\n  abstract parse(url: string): UrlTree;\n\n  /** Converts a `UrlTree` into a url */\n  abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n  /** Parses a url into a `UrlTree` */\n  parse(url: string): UrlTree {\n    const p = new UrlParser(url);\n    return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n  }\n\n  /** Converts a `UrlTree` into a url */\n  serialize(tree: UrlTree): string {\n    const segment = `/${serializeSegment(tree.root, true)}`;\n    const query = serializeQueryParams(tree.queryParams);\n    const fragment =\n        typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n\n    return `${segment}${query}${fragment}`;\n  }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n  return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n  if (!segment.hasChildren()) {\n    return serializePaths(segment);\n  }\n\n  if (root) {\n    const primary = segment.children[PRIMARY_OUTLET] ?\n        serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n        '';\n    const children: string[] = [];\n\n    forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n      if (k !== PRIMARY_OUTLET) {\n        children.push(`${k}:${serializeSegment(v, false)}`);\n      }\n    });\n\n    return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n  } else {\n    const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n      if (k === PRIMARY_OUTLET) {\n        return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n      }\n\n      return [`${k}:${serializeSegment(v, false)}`];\n    });\n\n    // use no parenthesis if the only child is a primary outlet route\n    if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n      return `${serializePaths(segment)}/${children[0]}`;\n    }\n\n    return `${serializePaths(segment)}/(${children.join('//')})`;\n  }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n  return encodeURIComponent(s)\n      .replace(/%40/g, '@')\n      .replace(/%3A/gi, ':')\n      .replace(/%24/g, '$')\n      .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n  return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n  return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n  return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n  return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n  return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n  return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n  return Object.keys(params)\n      .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n      .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n  const strParams: string[] =\n      Object.keys(params)\n          .map((name) => {\n            const value = params[name];\n            return Array.isArray(value) ?\n                value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n                `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n          })\n          .filter(s => !!s);\n\n  return strParams.length ? `?${strParams.join('&')}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n  const match = str.match(SEGMENT_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n  const match = str.match(QUERY_PARAM_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n  const match = str.match(QUERY_PARAM_VALUE_RE);\n  return match ? match[0] : '';\n}\n\nclass UrlParser {\n  private remaining: string;\n\n  constructor(private url: string) {\n    this.remaining = url;\n  }\n\n  parseRootSegment(): UrlSegmentGroup {\n    this.consumeOptional('/');\n\n    if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n      return new UrlSegmentGroup([], {});\n    }\n\n    // The root segment group never has segments\n    return new UrlSegmentGroup([], this.parseChildren());\n  }\n\n  parseQueryParams(): Params {\n    const params: Params = {};\n    if (this.consumeOptional('?')) {\n      do {\n        this.parseQueryParam(params);\n      } while (this.consumeOptional('&'));\n    }\n    return params;\n  }\n\n  parseFragment(): string|null {\n    return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n  }\n\n  private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n    if (this.remaining === '') {\n      return {};\n    }\n\n    this.consumeOptional('/');\n\n    const segments: UrlSegment[] = [];\n    if (!this.peekStartsWith('(')) {\n      segments.push(this.parseSegment());\n    }\n\n    while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n      this.capture('/');\n      segments.push(this.parseSegment());\n    }\n\n    let children: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('/(')) {\n      this.capture('/');\n      children = this.parseParens(true);\n    }\n\n    let res: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('(')) {\n      res = this.parseParens(false);\n    }\n\n    if (segments.length > 0 || Object.keys(children).length > 0) {\n      res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n    }\n\n    return res;\n  }\n\n  // parse a segment with its matrix parameters\n  // ie `name;k1=v1;k2`\n  private parseSegment(): UrlSegment {\n    const path = matchSegments(this.remaining);\n    if (path === '' && this.peekStartsWith(';')) {\n      throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n    }\n\n    this.capture(path);\n    return new UrlSegment(decode(path), this.parseMatrixParams());\n  }\n\n  private parseMatrixParams(): {[key: string]: string} {\n    const params: {[key: string]: string} = {};\n    while (this.consumeOptional(';')) {\n      this.parseParam(params);\n    }\n    return params;\n  }\n\n  private parseParam(params: {[key: string]: string}): void {\n    const key = matchSegments(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchSegments(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    params[decode(key)] = decode(value);\n  }\n\n  // Parse a single query parameter `name[=value]`\n  private parseQueryParam(params: Params): void {\n    const key = matchQueryParams(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchUrlQueryParamValue(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    const decodedKey = decodeQuery(key);\n    const decodedVal = decodeQuery(value);\n\n    if (params.hasOwnProperty(decodedKey)) {\n      // Append to existing values\n      let currentVal = params[decodedKey];\n      if (!Array.isArray(currentVal)) {\n        currentVal = [currentVal];\n        params[decodedKey] = currentVal;\n      }\n      currentVal.push(decodedVal);\n    } else {\n      // Create a new value\n      params[decodedKey] = decodedVal;\n    }\n  }\n\n  // parse `(a/b//outlet_name:c/d)`\n  private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n    const segments: {[key: string]: UrlSegmentGroup} = {};\n    this.capture('(');\n\n    while (!this.consumeOptional(')') && this.remaining.length > 0) {\n      const path = matchSegments(this.remaining);\n\n      const next = this.remaining[path.length];\n\n      // if is is not one of these characters, then the segment was unescaped\n      // or the group was not closed\n      if (next !== '/' && next !== ')' && next !== ';') {\n        throw new Error(`Cannot parse url '${this.url}'`);\n      }\n\n      let outletName: string = undefined!;\n      if (path.indexOf(':') > -1) {\n        outletName = path.substr(0, path.indexOf(':'));\n        this.capture(outletName);\n        this.capture(':');\n      } else if (allowPrimary) {\n        outletName = PRIMARY_OUTLET;\n      }\n\n      const children = this.parseChildren();\n      segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n                                                                  new UrlSegmentGroup([], children);\n      this.consumeOptional('//');\n    }\n\n    return segments;\n  }\n\n  private peekStartsWith(str: string): boolean {\n    return this.remaining.startsWith(str);\n  }\n\n  // Consumes the prefix when it is present and returns whether it has been consumed\n  private consumeOptional(str: string): boolean {\n    if (this.peekStartsWith(str)) {\n      this.remaining = this.remaining.substring(str.length);\n      return true;\n    }\n    return false;\n  }\n\n  private capture(str: string): void {\n    if (!this.consumeOptional(str)) {\n      throw new Error(`Expected \"${str}\".`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n  /** @internal */\n  _root: TreeNode<T>;\n\n  constructor(root: TreeNode<T>) {\n    this._root = root;\n  }\n\n  get root(): T {\n    return this._root.value;\n  }\n\n  /**\n   * @internal\n   */\n  parent(t: T): T|null {\n    const p = this.pathFromRoot(t);\n    return p.length > 1 ? p[p.length - 2] : null;\n  }\n\n  /**\n   * @internal\n   */\n  children(t: T): T[] {\n    const n = findNode(t, this._root);\n    return n ? n.children.map(t => t.value) : [];\n  }\n\n  /**\n   * @internal\n   */\n  firstChild(t: T): T|null {\n    const n = findNode(t, this._root);\n    return n && n.children.length > 0 ? n.children[0].value : null;\n  }\n\n  /**\n   * @internal\n   */\n  siblings(t: T): T[] {\n    const p = findPath(t, this._root);\n    if (p.length < 2) return [];\n\n    const c = p[p.length - 2].children.map(c => c.value);\n    return c.filter(cc => cc !== t);\n  }\n\n  /**\n   * @internal\n   */\n  pathFromRoot(t: T): T[] {\n    return findPath(t, this._root).map(s => s.value);\n  }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n  if (value === node.value) return node;\n\n  for (const child of node.children) {\n    const node = findNode(value, child);\n    if (node) return node;\n  }\n\n  return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n  if (value === node.value) return [node];\n\n  for (const child of node.children) {\n    const path = findPath(value, child);\n    if (path.length) {\n      path.unshift(node);\n      return path;\n    }\n  }\n\n  return [];\n}\n\nexport class TreeNode<T> {\n  constructor(public value: T, public children: TreeNode<T>[]) {}\n\n  toString(): string {\n    return `TreeNode(${this.value})`;\n  }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends {outlet: string}>(node: TreeNode<T>|null) {\n  const map: {[outlet: string]: TreeNode<T>} = {};\n\n  if (node) {\n    node.children.forEach(child => map[child.value.outlet] = child);\n  }\n\n  return map;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalSegments, UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const root: ActivatedRoute = state.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n  /** @internal */\n  constructor(\n      root: TreeNode<ActivatedRoute>,\n      /** The current snapshot of the router state */\n      public snapshot: RouterStateSnapshot) {\n    super(root);\n    setRouterState(<RouterState>this, root);\n  }\n\n  override toString(): string {\n    return this.snapshot.toString();\n  }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>|null): RouterState {\n  const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n  const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n  const emptyParams = new BehaviorSubject({});\n  const emptyData = new BehaviorSubject({});\n  const emptyQueryParams = new BehaviorSubject({});\n  const fragment = new BehaviorSubject('');\n  const activated = new ActivatedRoute(\n      emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n      snapshot.root);\n  activated.snapshot = snapshot.root;\n  return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n    urlTree: UrlTree, rootComponent: Type<any>|null): RouterStateSnapshot {\n  const emptyParams = {};\n  const emptyData = {};\n  const emptyQueryParams = {};\n  const fragment = '';\n  const activated = new ActivatedRouteSnapshot(\n      [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n      urlTree.root, -1, {});\n  return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n *     header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n  /** The current snapshot of this route */\n  snapshot!: ActivatedRouteSnapshot;\n  /** @internal */\n  _futureSnapshot: ActivatedRouteSnapshot;\n  /** @internal */\n  _routerState!: RouterState;\n  /** @internal */\n  _paramMap!: Observable<ParamMap>;\n  /** @internal */\n  _queryParamMap!: Observable<ParamMap>;\n\n  /** @internal */\n  constructor(\n      /** An observable of the URL segments matched by this route. */\n      public url: Observable<UrlSegment[]>,\n      /** An observable of the matrix parameters scoped to this route. */\n      public params: Observable<Params>,\n      /** An observable of the query parameters shared by all the routes. */\n      public queryParams: Observable<Params>,\n      /** An observable of the URL fragment shared by all the routes. */\n      public fragment: Observable<string|null>,\n      /** An observable of the static and resolved data of this route. */\n      public data: Observable<Data>,\n      /** The outlet name of the route, a constant. */\n      public outlet: string,\n      /** The component of the route, a constant. */\n      // TODO(vsavkin): remove |string\n      public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n    this._futureSnapshot = futureSnapshot;\n  }\n\n  /** The configuration used to match this route. */\n  get routeConfig(): Route|null {\n    return this._futureSnapshot.routeConfig;\n  }\n\n  /** The root of the router state. */\n  get root(): ActivatedRoute {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree. */\n  get parent(): ActivatedRoute|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree. */\n  get firstChild(): ActivatedRoute|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree. */\n  get children(): ActivatedRoute[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route. */\n  get pathFromRoot(): ActivatedRoute[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  /**\n   * An Observable that contains a map of the required and optional parameters\n   * specific to the route.\n   * The map supports retrieving single and multiple values from the same parameter.\n   */\n  get paramMap(): Observable<ParamMap> {\n    if (!this._paramMap) {\n      this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._paramMap;\n  }\n\n  /**\n   * An Observable that contains a map of the query parameters available to all routes.\n   * The map supports retrieving single and multiple values from the query parameter.\n   */\n  get queryParamMap(): Observable<ParamMap> {\n    if (!this._queryParamMap) {\n      this._queryParamMap =\n          this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n  }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly'|'always';\n\n/** @internal */\nexport type Inherited = {\n  params: Params,\n  data: Data,\n  resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n    route: ActivatedRouteSnapshot,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n  const pathFromRoot = route.pathFromRoot;\n\n  let inheritingStartingFrom = 0;\n  if (paramsInheritanceStrategy !== 'always') {\n    inheritingStartingFrom = pathFromRoot.length - 1;\n\n    while (inheritingStartingFrom >= 1) {\n      const current = pathFromRoot[inheritingStartingFrom];\n      const parent = pathFromRoot[inheritingStartingFrom - 1];\n      // current route is an empty path => inherits its parent's params and data\n      if (current.routeConfig && current.routeConfig.path === '') {\n        inheritingStartingFrom--;\n\n        // parent is componentless => current route should inherit its params and data\n      } else if (!parent.component) {\n        inheritingStartingFrom--;\n\n      } else {\n        break;\n      }\n    }\n  }\n\n  return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n  return pathFromRoot.reduce((res, curr) => {\n    const params = {...res.params, ...curr.params};\n    const data = {...res.data, ...curr.data};\n    const resolve = {...res.resolve, ...curr._resolvedData};\n    return {params, data, resolve};\n  }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n *   constructor(route: ActivatedRoute) {\n *     const id: string = route.snapshot.params.id;\n *     const url: string = route.snapshot.url.join('');\n *     const user = route.snapshot.data.user;\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n  /** The configuration used to match this route **/\n  public readonly routeConfig: Route|null;\n  /** @internal **/\n  _urlSegment: UrlSegmentGroup;\n  /** @internal */\n  _lastPathIndex: number;\n  /** @internal */\n  _resolve: ResolveData;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _resolvedData!: Data;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _routerState!: RouterStateSnapshot;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _paramMap!: ParamMap;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The URL segments matched by this route */\n      public url: UrlSegment[],\n      /**\n       *  The matrix parameters scoped to this route.\n       *\n       *  You can compute all params (or data) in the router state or to get params outside\n       *  of an activated component by traversing the `RouterState` tree as in the following\n       *  example:\n       *  ```\n       *  collectRouteParams(router: Router) {\n       *    let params = {};\n       *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n       *    while (stack.length > 0) {\n       *      const route = stack.pop()!;\n       *      params = {...params, ...route.params};\n       *      stack.push(...route.children);\n       *    }\n       *    return params;\n       *  }\n       *  ```\n       */\n      public params: Params,\n      /** The query parameters shared by all the routes */\n      public queryParams: Params,\n      /** The URL fragment shared by all the routes */\n      public fragment: string|null,\n      /** The static and resolved data of this route */\n      public data: Data,\n      /** The outlet name of the route */\n      public outlet: string,\n      /** The component of the route */\n      public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n      lastPathIndex: number, resolve: ResolveData) {\n    this.routeConfig = routeConfig;\n    this._urlSegment = urlSegment;\n    this._lastPathIndex = lastPathIndex;\n    this._resolve = resolve;\n  }\n\n  /** The root of the router state */\n  get root(): ActivatedRouteSnapshot {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree */\n  get parent(): ActivatedRouteSnapshot|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree */\n  get firstChild(): ActivatedRouteSnapshot|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree */\n  get children(): ActivatedRouteSnapshot[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route */\n  get pathFromRoot(): ActivatedRouteSnapshot[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  get paramMap(): ParamMap {\n    if (!this._paramMap) {\n      this._paramMap = convertToParamMap(this.params);\n    }\n    return this._paramMap;\n  }\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    const url = this.url.map(segment => segment.toString()).join('/');\n    const matched = this.routeConfig ? this.routeConfig.path : '';\n    return `Route(url:'${url}', path:'${matched}')`;\n  }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const snapshot: RouterStateSnapshot = state.snapshot;\n *     const root: ActivatedRouteSnapshot = snapshot.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n  /** @internal */\n  constructor(\n      /** The url from which this snapshot was created */\n      public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n    super(root);\n    setRouterState(<RouterStateSnapshot>this, root);\n  }\n\n  override toString(): string {\n    return serializeNode(this._root);\n  }\n}\n\nfunction setRouterState<U, T extends {_routerState: U}>(state: U, node: TreeNode<T>): void {\n  node.value._routerState = state;\n  node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n  const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n  return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n  if (route.snapshot) {\n    const currentSnapshot = route.snapshot;\n    const nextSnapshot = route._futureSnapshot;\n    route.snapshot = nextSnapshot;\n    if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n      (<any>route.queryParams).next(nextSnapshot.queryParams);\n    }\n    if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n      (<any>route.fragment).next(nextSnapshot.fragment);\n    }\n    if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n      (<any>route.params).next(nextSnapshot.params);\n    }\n    if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n      (<any>route.url).next(nextSnapshot.url);\n    }\n    if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n      (<any>route.data).next(nextSnapshot.data);\n    }\n  } else {\n    route.snapshot = route._futureSnapshot;\n\n    // this is for resolved data\n    (<any>route.data).next(route._futureSnapshot.data);\n  }\n}\n\n\nexport function equalParamsAndUrlSegments(\n    a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n  const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n  const parentsMismatch = !a.parent !== !b.parent;\n\n  return equalUrlParams && !parentsMismatch &&\n      (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent!));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n    routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n    prevState: RouterState): RouterState {\n  const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n  return new RouterState(root, curr);\n}\n\nfunction createNode(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n  // reuse an activated route that is currently displayed on the screen\n  if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n    const value = prevState.value;\n    value._futureSnapshot = curr.value;\n    const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n    return new TreeNode<ActivatedRoute>(value, children);\n  } else {\n    if (routeReuseStrategy.shouldAttach(curr.value)) {\n      // retrieve an activated route that is used to be displayed, but is not currently displayed\n      const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n      if (detachedRouteHandle !== null) {\n        const tree = (detachedRouteHandle as DetachedRouteHandleInternal).route;\n        setFutureSnapshotsOfActivatedRoutes(curr, tree);\n        return tree;\n      }\n    }\n\n    const value = createActivatedRoute(curr.value);\n    const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n    return new TreeNode<ActivatedRoute>(value, children);\n  }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n    curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n  if (curr.value.routeConfig !== result.value.routeConfig) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n  }\n  if (curr.children.length !== result.children.length) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n  }\n  result.value._futureSnapshot = curr.value;\n  for (let i = 0; i < curr.children.length; ++i) {\n    setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n  }\n}\n\nfunction createOrReuseChildren(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState: TreeNode<ActivatedRoute>) {\n  return curr.children.map(child => {\n    for (const p of prevState.children) {\n      if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n        return createNode(routeReuseStrategy, child, p);\n      }\n    }\n    return createNode(routeReuseStrategy, child);\n  });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n  return new ActivatedRoute(\n      new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n      new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n    route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params|null,\n    fragment: string|null): UrlTree {\n  if (commands.length === 0) {\n    return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n  }\n\n  const nav = computeNavigation(commands);\n\n  if (nav.toRoot()) {\n    return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n  }\n\n  const startingPosition = findStartingPosition(nav, urlTree, route);\n\n  const segmentGroup = startingPosition.processChildren ?\n      updateSegmentGroupChildren(\n          startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n      updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n  return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n  return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command: any): command is {outlets: {[key: string]: any}} {\n  return typeof command === 'object' && command != null && command.outlets;\n}\n\nfunction tree(\n    oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n    queryParams: Params|null, fragment: string|null): UrlTree {\n  let qp: any = {};\n  if (queryParams) {\n    forEach(queryParams, (value: any, name: any) => {\n      qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n    });\n  }\n\n  if (urlTree.root === oldSegmentGroup) {\n    return new UrlTree(newSegmentGroup, qp, fragment);\n  }\n\n  return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n    current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n    newSegment: UrlSegmentGroup): UrlSegmentGroup {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n    if (c === oldSegment) {\n      children[outletName] = newSegment;\n    } else {\n      children[outletName] = replaceSegment(c, oldSegment, newSegment);\n    }\n  });\n  return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n  constructor(\n      public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n    if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n      throw new Error('Root segment cannot have matrix parameters');\n    }\n\n    const cmdWithOutlet = commands.find(isCommandWithOutlets);\n    if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n      throw new Error('{outlets:{}} has to be the last command');\n    }\n  }\n\n  public toRoot(): boolean {\n    return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n  }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n  if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n    return new Navigation(true, 0, commands);\n  }\n\n  let numberOfDoubleDots = 0;\n  let isAbsolute = false;\n\n  const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n    if (typeof cmd === 'object' && cmd != null) {\n      if (cmd.outlets) {\n        const outlets: {[k: string]: any} = {};\n        forEach(cmd.outlets, (commands: any, name: string) => {\n          outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n        });\n        return [...res, {outlets}];\n      }\n\n      if (cmd.segmentPath) {\n        return [...res, cmd.segmentPath];\n      }\n    }\n\n    if (!(typeof cmd === 'string')) {\n      return [...res, cmd];\n    }\n\n    if (cmdIdx === 0) {\n      cmd.split('/').forEach((urlPart, partIndex) => {\n        if (partIndex == 0 && urlPart === '.') {\n          // skip './a'\n        } else if (partIndex == 0 && urlPart === '') {  //  '/a'\n          isAbsolute = true;\n        } else if (urlPart === '..') {  //  '../a'\n          numberOfDoubleDots++;\n        } else if (urlPart != '') {\n          res.push(urlPart);\n        }\n      });\n\n      return res;\n    }\n\n    return [...res, cmd];\n  }, []);\n\n  return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n  constructor(\n      public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n  }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n  if (nav.isAbsolute) {\n    return new Position(tree.root, true, 0);\n  }\n\n  if (route.snapshot._lastPathIndex === -1) {\n    const segmentGroup = route.snapshot._urlSegment;\n    // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n    // see issue #26224, #13011, #35687\n    // However, if the ActivatedRoute is the root we should process children like above.\n    const processChildren = segmentGroup === tree.root;\n    return new Position(segmentGroup, processChildren, 0);\n  }\n\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = route.snapshot._lastPathIndex + modifier;\n  return createPositionApplyingDoubleDots(\n      route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n    group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n  let g = group;\n  let ci = index;\n  let dd = numberOfDoubleDots;\n  while (dd > ci) {\n    dd -= ci;\n    g = g.parent!;\n    if (!g) {\n      throw new Error('Invalid number of \\'../\\'');\n    }\n    ci = g.segments.length;\n  }\n  return new Position(g, false, ci - dd);\n}\n\nfunction getOutlets(commands: unknown[]): {[k: string]: unknown[]|string} {\n  if (isCommandWithOutlets(commands[0])) {\n    return commands[0].outlets;\n  }\n\n  return {[PRIMARY_OUTLET]: commands};\n}\n\nfunction updateSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (!segmentGroup) {\n    segmentGroup = new UrlSegmentGroup([], {});\n  }\n  if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n    return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n  }\n\n  const m = prefixedWith(segmentGroup, startIndex, commands);\n  const slicedCommands = commands.slice(m.commandIndex);\n  if (m.match && m.pathIndex < segmentGroup.segments.length) {\n    const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n    g.children[PRIMARY_OUTLET] =\n        new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n    return updateSegmentGroupChildren(g, 0, slicedCommands);\n  } else if (m.match && slicedCommands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else if (m.match && !segmentGroup.hasChildren()) {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  } else if (m.match) {\n    return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n  } else {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  }\n}\n\nfunction updateSegmentGroupChildren(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (commands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else {\n    const outlets = getOutlets(commands);\n    const children: {[key: string]: UrlSegmentGroup} = {};\n\n    forEach(outlets, (commands, outlet) => {\n      if (typeof commands === 'string') {\n        commands = [commands];\n      }\n      if (commands !== null) {\n        children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n      }\n    });\n\n    forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n      if (outlets[childOutlet] === undefined) {\n        children[childOutlet] = child;\n      }\n    });\n    return new UrlSegmentGroup(segmentGroup.segments, children);\n  }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n  let currentCommandIndex = 0;\n  let currentPathIndex = startIndex;\n\n  const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n  while (currentPathIndex < segmentGroup.segments.length) {\n    if (currentCommandIndex >= commands.length) return noMatch;\n    const path = segmentGroup.segments[currentPathIndex];\n    const command = commands[currentCommandIndex];\n    // Do not try to consume command as part of the prefixing if it has outlets because it can\n    // contain outlets other than the one being processed. Consuming the outlets command would\n    // result in other outlets being ignored.\n    if (isCommandWithOutlets(command)) {\n      break;\n    }\n    const curr = `${command}`;\n    const next =\n        currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n    if (currentPathIndex > 0 && curr === undefined) break;\n\n    if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n      if (!compare(curr, next, path)) return noMatch;\n      currentCommandIndex += 2;\n    } else {\n      if (!compare(curr, {}, path)) return noMatch;\n      currentCommandIndex++;\n    }\n    currentPathIndex++;\n  }\n\n  return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  const paths = segmentGroup.segments.slice(0, startIndex);\n\n  let i = 0;\n  while (i < commands.length) {\n    const command = commands[i];\n    if (isCommandWithOutlets(command)) {\n      const children = createNewSegmentChildren(command.outlets);\n      return new UrlSegmentGroup(paths, children);\n    }\n\n    // if we start with an object literal, we need to reuse the path part from the segment\n    if (i === 0 && isMatrixParams(commands[0])) {\n      const p = segmentGroup.segments[startIndex];\n      paths.push(new UrlSegment(p.path, stringify(commands[0])));\n      i++;\n      continue;\n    }\n\n    const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n    const next = (i < commands.length - 1) ? commands[i + 1] : null;\n    if (curr && next && isMatrixParams(next)) {\n      paths.push(new UrlSegment(curr, stringify(next)));\n      i += 2;\n    } else {\n      paths.push(new UrlSegment(curr, {}));\n      i++;\n    }\n  }\n  return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: unknown[]|string}):\n    {[outlet: string]: UrlSegmentGroup} {\n  const children: {[outlet: string]: UrlSegmentGroup} = {};\n  forEach(outlets, (commands, outlet) => {\n    if (typeof commands === 'string') {\n      commands = [commands];\n    }\n    if (commands !== null) {\n      children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n    }\n  });\n  return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n  const res: {[key: string]: string} = {};\n  forEach(params, (v: any, k: string) => res[k] = `${v}`);\n  return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n  return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, advanceActivatedRoute, RouterState} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport const activateRoutes =\n    (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n     forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n        map(t => {\n          new ActivateRoutes(\n              routeReuseStrategy, t.targetRouterState!, t.currentRouterState, forwardEvent)\n              .activate(rootContexts);\n          return t;\n        });\n\nexport class ActivateRoutes {\n  constructor(\n      private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n      private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n  activate(parentContexts: ChildrenOutletContexts): void {\n    const futureRoot = this.futureState._root;\n    const currRoot = this.currState ? this.currState._root : null;\n\n    this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n    advanceActivatedRoute(this.futureState.root);\n    this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n  }\n\n  // De-activate the child route that are not re-used for the future state\n  private deactivateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n    // Recurse on the routes active in the future state to de-activate deeper children\n    futureNode.children.forEach(futureChild => {\n      const childOutletName = futureChild.value.outlet;\n      this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n      delete children[childOutletName];\n    });\n\n    // De-activate the routes that will not be re-used\n    forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n      this.deactivateRouteAndItsChildren(v, contexts);\n    });\n  }\n\n  private deactivateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContext: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    if (future === curr) {\n      // Reusing the node, check to see if the children need to be de-activated\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContext.getContext(future.outlet);\n        if (context) {\n          this.deactivateChildRoutes(futureNode, currNode, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.deactivateChildRoutes(futureNode, currNode, parentContext);\n      }\n    } else {\n      if (curr) {\n        // Deactivate the current route which will not be re-used\n        this.deactivateRouteAndItsChildren(currNode, parentContext);\n      }\n    }\n  }\n\n  private deactivateRouteAndItsChildren(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n      this.detachAndStoreRouteSubtree(route, parentContexts);\n    } else {\n      this.deactivateRouteAndOutlet(route, parentContexts);\n    }\n  }\n\n  private detachAndStoreRouteSubtree(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    if (context && context.outlet) {\n      const componentRef = context.outlet.detach();\n      const contexts = context.children.onOutletDeactivated();\n      this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n    }\n  }\n\n  private deactivateRouteAndOutlet(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    // The context could be `null` if we are on a componentless route but there may still be\n    // children that need deactivating.\n    const contexts = context && route.value.component ? context.children : parentContexts;\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);\n\n    for (const childOutlet of Object.keys(children)) {\n      this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n    }\n\n    if (context && context.outlet) {\n      // Destroy the component\n      context.outlet.deactivate();\n      // Destroy the contexts for all the outlets that were in the component\n      context.children.onOutletDeactivated();\n      // Clear the information about the attached component on the context but keep the reference to\n      // the outlet.\n      context.attachRef = null;\n      context.resolver = null;\n      context.route = null;\n    }\n  }\n\n  private activateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outlet: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n    futureNode.children.forEach(c => {\n      this.activateRoutes(c, children[c.value.outlet], contexts);\n      this.forwardEvent(new ActivationEnd(c.value.snapshot));\n    });\n    if (futureNode.children.length) {\n      this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n    }\n  }\n\n  private activateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContexts: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    advanceActivatedRoute(future);\n\n    // reusing the node\n    if (future === curr) {\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n        this.activateChildRoutes(futureNode, currNode, context.children);\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, currNode, parentContexts);\n      }\n    } else {\n      if (future.component) {\n        // if we have a normal route, we need to place the component into the outlet and recurse.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n\n        if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n          const stored =\n              (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n          this.routeReuseStrategy.store(future.snapshot, null);\n          context.children.onOutletReAttached(stored.contexts);\n          context.attachRef = stored.componentRef;\n          context.route = stored.route.value;\n          if (context.outlet) {\n            // Attach right away when the outlet has already been instantiated\n            // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n            context.outlet.attach(stored.componentRef, stored.route.value);\n          }\n          advanceActivatedRouteNodeAndItsChildren(stored.route);\n        } else {\n          const config = parentLoadedConfig(future.snapshot);\n          const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n          context.attachRef = null;\n          context.route = future;\n          context.resolver = cmpFactoryResolver;\n          if (context.outlet) {\n            // Activate the outlet when it has already been instantiated\n            // Otherwise it will get activated from its `ngOnInit` when instantiated\n            context.outlet.activateWith(future, cmpFactoryResolver);\n          }\n\n          this.activateChildRoutes(futureNode, null, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, null, parentContexts);\n      }\n    }\n  }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n  advanceActivatedRoute(node.value);\n  node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n    if (route && route.component) return null;\n  }\n\n  return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * Represents a route configuration for the Router service.\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\n * in `Route.children`.\n *\n * @see `Route`\n * @see `Router`\n * @see [Router configuration guide](guide/router-reference#configuration)\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * Represents the result of matching URLs with a custom matching function.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @see `UrlMatcher()`\n * @publicApi\n */\nexport type UrlMatchResult = {\n  consumed: UrlSegment[];\n  posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * A function for matching a route against URLs. Implement a custom URL matcher\n * for `Route.matcher` when a combination of `path` and `pathMatch`\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\n *\n * The function takes the following arguments and returns a `UrlMatchResult` object.\n * * *segments* : An array of URL segments.\n * * *group* : A segment group.\n * * *route* : The route to match against.\n *\n * The following example implementation matches HTML files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n    UrlMatchResult|null;\n\n/**\n *\n * Represents static data associated with a particular route.\n *\n * @see `Route#data`\n *\n * @publicApi\n */\nexport type Data = {\n  [name: string]: any\n};\n\n/**\n *\n * Represents the resolved data associated with a particular route.\n *\n * @see `Route#resolve`.\n *\n * @publicApi\n */\nexport type ResolveData = {\n  [name: string]: any\n};\n\n/**\n *\n * A function that is called to resolve a collection of lazy-loaded routes.\n * Must be an arrow function of the following form:\n * `() => import('...').then(mod => mod.MODULE)`\n *\n * For example:\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @see [Route.loadChildren](api/router/Route#loadChildren)\n * @publicApi\n */\nexport type LoadChildrenCallback = () => Type<any>|NgModuleFactory<any>|Observable<Type<any>>|\n    Promise<NgModuleFactory<any>|Type<any>|any>;\n\n/**\n *\n * A function that returns a set of routes to load.\n *\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\n * form (`LoadChildrenCallback`) should be used instead.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n */\nexport type LoadChildren = LoadChildrenCallback|DeprecatedLoadChildren;\n\n/**\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n * @deprecated The `string` form of `loadChildren` is deprecated in favor of the\n * `LoadChildrenCallback` function which uses the ES dynamic `import()` expression.\n * This offers a more natural and standards-based mechanism to dynamically\n * load an ES module at runtime.\n */\nexport type DeprecatedLoadChildren = string;\n\n/**\n *\n * How to handle query parameters in a router link.\n * One of:\n * - `merge` : Merge new with current parameters.\n * - `preserve` : Preserve current parameters.\n *\n * @see `UrlCreationOptions#queryParamsHandling`\n * @see `RouterLink`\n * @publicApi\n */\nexport type QueryParamsHandling = 'merge'|'preserve'|'';\n\n/**\n *\n * A policy for when to run guards and resolvers on a route.\n *\n * @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)\n * @publicApi\n */\nexport type RunGuardsAndResolvers =\n    'pathParamsChange'|'pathParamsOrQueryParamsChange'|'paramsChange'|'paramsOrQueryParamsChange'|\n    'always'|((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * A configuration object that defines a single route.\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\n * The router attempts to match segments of a given URL against each route,\n * using the configuration options defined in this object.\n *\n * Supports static, parameterized, redirect, and wildcard routes, as well as\n * custom route data and resolve methods.\n *\n * For detailed usage information, see the [Routing Guide](guide/router).\n *\n * @usageNotes\n *\n * ### Simple Configuration\n *\n * The following route specifies that when navigating to, for example,\n * `/team/11/user/bob`, the router creates the 'Team' component\n * with the 'User' child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n  *  component: Team,\n *   children: [{\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * ### Multiple Outlets\n *\n * The following route creates sibling components with multiple outlets.\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team\n * }, {\n *   path: 'chat/:user',\n *   component: Chat\n *   outlet: 'aux'\n * }]\n * ```\n *\n * ### Wild Cards\n *\n * The following route uses wild-card notation to specify a component\n * that is always instantiated regardless of where you navigate to.\n *\n * ```\n * [{\n *   path: '**',\n *   component: WildcardComponent\n * }]\n * ```\n *\n * ### Redirects\n *\n * The following route uses the `redirectTo` property to ignore a segment of\n * a given URL when looking for a child path.\n *\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\n * the Team component with the User child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: 'legacy/user/:name',\n *     redirectTo: 'user/:name'\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * The redirect path can be relative, as shown in this example, or absolute.\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\n * the result URL is also absolute, '/user/jim'.\n\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any URL segments.\n *\n * In the following configuration, when navigating to\n * `/team/11`, the router instantiates the 'AllUsers' component.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: AllUsers\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * Empty-path routes can have children. In the following example, when navigating\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\n * the user component in it.\n *\n * Note that an empty path route inherits its parent's parameters and data.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: WrapperCmp,\n *     children: [{\n *       path: 'user/:name',\n *       component: User\n *     }]\n *   }]\n * }]\n * ```\n *\n * ### Matching Strategy\n *\n * The default path-match strategy is 'prefix', which means that the router\n * checks URL elements from the left to see if the URL matches a specified path.\n * For example, '/team/11/user' matches 'team/:id'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'prefix', //default\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * You can specify the path-match strategy 'full' to make sure that the path\n * covers the whole unconsumed URL. It is important to do this when redirecting\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating to the redirect destination,\n * creating an endless loop.\n *\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\n * that the router applies the redirect if and only if navigating to '/'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'full',\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * You can share parameters between sibling components.\n * For example, suppose that two sibling components should go next to each other,\n * and both of them require an ID parameter. You can accomplish this using a route\n * that does not specify a component at the top level.\n *\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\n * the main child and aux child components next to each other.\n * For this to work, the application component must have the primary and aux outlets defined.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: 'a', component: MainChild },\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * The router merges the parameters, data, and resolve of the componentless\n * parent into the parameters, data, and resolve of the children.\n *\n * This is especially useful when child components are defined\n * with an empty path string, as in the following example.\n * With this configuration, navigating to '/parent/10' creates\n * the main child and aux components.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: '', component: MainChild },\n *      { path: '', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up application load time by splitting the application\n * into multiple bundles and loading them on demand.\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\n * instead of the `children` property.\n *\n * Given the following example route, the router will lazy load\n * the associated module on demand using the browser native import system.\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @publicApi\n */\nexport interface Route {\n  /**\n   * The path to match against. Cannot be used together with a custom `matcher` function.\n   * A URL string that uses router matching notation.\n   * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\n   * Default is \"/\" (the root path).\n   *\n   */\n  path?: string;\n  /**\n   * The path-matching strategy, one of 'prefix' or 'full'.\n   * Default is 'prefix'.\n   *\n   * By default, the router checks URL elements from the left to see if the URL\n   * matches a given path and stops when there is a config match. Importantly there must still be a\n   * config match for each segment of the URL. For example, '/team/11/user' matches the prefix\n   * 'team/:id' if one of the route's children matches the segment 'user'. That is, the URL\n   * '/team/11/user` matches the config\n   * `{path: 'team/:id', children: [{path: ':user', component: User}]}`\n   * but does not match when there are no children as in `{path: 'team/:id', component: Team}`.\n   *\n   * The path-match strategy 'full' matches against the entire URL.\n   * It is important to do this when redirecting empty-path routes.\n   * Otherwise, because an empty path is a prefix of any URL,\n   * the router would apply the redirect even when navigating\n   * to the redirect destination, creating an endless loop.\n   *\n   */\n  pathMatch?: string;\n  /**\n   * A custom URL-matching function. Cannot be used together with `path`.\n   */\n  matcher?: UrlMatcher;\n  /**\n   * The component to instantiate when the path matches.\n   * Can be empty if child routes specify components.\n   */\n  component?: Type<any>;\n  /**\n   * A URL to redirect to when the path matches.\n   *\n   * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\n   * Note that no further redirects are evaluated after an absolute redirect.\n   *\n   * When not present, router does not redirect.\n   */\n  redirectTo?: string;\n  /**\n   * Name of a `RouterOutlet` object where the component can be placed\n   * when the path matches.\n   */\n  outlet?: string;\n  /**\n   * An array of dependency-injection tokens used to look up `CanActivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * activate the component. By default, any user can activate.\n   */\n  canActivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanActivateChild()` handlers,\n   * in order to determine if the current user is allowed to activate\n   * a child of the component. By default, any user can activate a child.\n   */\n  canActivateChild?: any[];\n  /**\n   * An array of DI tokens used to look up `CanDeactivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * deactivate the component. By default, any user can deactivate.\n   *\n   */\n  canDeactivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanLoad()`\n   * handlers, in order to determine if the current user is allowed to\n   * load the component. By default, any user can load.\n   */\n  canLoad?: any[];\n  /**\n   * Additional developer-defined data provided to the component via\n   * `ActivatedRoute`. By default, no additional data is passed.\n   */\n  data?: Data;\n  /**\n   * A map of DI tokens used to look up data resolvers. See `Resolve`.\n   */\n  resolve?: ResolveData;\n  /**\n   * An array of child `Route` objects that specifies a nested route\n   * configuration.\n   */\n  children?: Routes;\n  /**\n   * An object specifying lazy-loaded child routes.\n   */\n  loadChildren?: LoadChildren;\n  /**\n   * Defines when guards and resolvers will be run. One of\n   * - `paramsOrQueryParamsChange` : Run when query parameters change.\n   * - `always` : Run on every execution.\n   * By default, guards and resolvers run only when the matrix\n   * parameters of the route change.\n   */\n  runGuardsAndResolvers?: RunGuardsAndResolvers;\n  /**\n   * Filled for routes with `loadChildren` once the module has been loaded\n   * @internal\n   */\n  _loadedConfig?: LoadedRouterConfig;\n  /**\n   * Filled for routes with `loadChildren` during load\n   * @internal\n   */\n  _loader$?: Observable<LoadedRouterConfig>;\n}\n\nexport class LoadedRouterConfig {\n  constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n *   return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n *   return fn(1, 2);\n * } else {\n *   throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n  return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n  return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n  return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n  return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n  return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n  return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n  return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {combineLatest, Observable, OperatorFunction} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n    OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n  return switchMap(obs => {\n    return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n               .pipe(\n                   scan(\n                       (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n                         let isPending = false;\n                         return list.reduce((innerAcc, val, i: number) => {\n                           if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n                           // Toggle pending flag if any values haven't been set yet\n                           if (val === INITIAL_VALUE) isPending = true;\n\n                           // Any other return values are only valid if we haven't yet hit a pending\n                           // call. This guarantees that in the case of a guard at the bottom of the\n                           // tree that returns a redirect, we will wait for the higher priority\n                           // guard at the top to finish before performing the redirect.\n                           if (!isPending) {\n                             // Early return when we hit a `false` value as that should always\n                             // cancel navigation\n                             if (val === false) return val;\n\n                             if (i === list.length - 1 || isUrlTree(val)) {\n                               return val;\n                             }\n                           }\n\n                           return innerAcc;\n                         }, acc);\n                       },\n                       INITIAL_VALUE),\n                   filter(item => item !== INITIAL_VALUE),\n                   map(item => isUrlTree(item) ? item : item === true),  //\n                   take(1)) as Observable<boolean|UrlTree>;\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class ɵEmptyOutletComponent {\n}\n\nexport {ɵEmptyOutletComponent as EmptyOutletComponent};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EmptyOutletComponent} from '../components/empty_outlet';\nimport {Route, Routes} from '../config';\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n  // forEach doesn't iterate undefined values\n  for (let i = 0; i < config.length; i++) {\n    const route: Route = config[i];\n    const fullPath: string = getFullPath(parentPath, route);\n    validateNode(route, fullPath);\n  }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (!route) {\n      throw new Error(`\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n    }\n    if (Array.isArray(route)) {\n      throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n    }\n    if (!route.component && !route.children && !route.loadChildren &&\n        (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n    }\n    if (route.redirectTo && route.children) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and children cannot be used together`);\n    }\n    if (route.redirectTo && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and loadChildren cannot be used together`);\n    }\n    if (route.children && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': children and loadChildren cannot be used together`);\n    }\n    if (route.redirectTo && route.component) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and component cannot be used together`);\n    }\n    if (route.redirectTo && route.canActivate) {\n      throw new Error(\n          `Invalid configuration of route '${\n              fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n          `so canActivate will never be executed.`);\n    }\n    if (route.path && route.matcher) {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n    }\n    if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n    }\n    if (route.path === void 0 && route.matcher === void 0) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': routes must have either a path or a matcher specified`);\n    }\n    if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n    }\n    if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n      const exp =\n          `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n      throw new Error(`Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${\n          route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n    }\n    if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n    }\n  }\n  if (route.children) {\n    validateConfig(route.children, fullPath);\n  }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n  if (!currentRoute) {\n    return parentPath;\n  }\n  if (!parentPath && !currentRoute.path) {\n    return '';\n  } else if (parentPath && !currentRoute.path) {\n    return `${parentPath}/`;\n  } else if (!parentPath && currentRoute.path) {\n    return currentRoute.path;\n  } else {\n    return `${parentPath}/${currentRoute.path}`;\n  }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n  const children = r.children && r.children.map(standardizeConfig);\n  const c = children ? {...r, children} : {...r};\n  if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n    c.component = EmptyOutletComponent;\n  }\n  return c;\n}\n\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nexport function getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\n\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nexport function sortByMatchingOutlets(routes: Routes, outletName: string): Routes {\n  const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n  sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n  return sortedConfig;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from '../config';\nimport {defaultUrlMatcher, PRIMARY_OUTLET} from '../shared';\nimport {UrlSegment, UrlSegmentGroup} from '../url_tree';\n\nimport {forEach} from './collection';\nimport {getOutlet} from './config';\n\nexport interface MatchResult {\n  matched: boolean;\n  consumedSegments: UrlSegment[];\n  lastChild: number;\n  parameters: {[k: string]: string};\n  positionalParamSegments: {[k: string]: UrlSegment};\n}\n\nconst noMatch: MatchResult = {\n  matched: false,\n  consumedSegments: [],\n  lastChild: 0,\n  parameters: {},\n  positionalParamSegments: {}\n};\n\nexport function match(\n    segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n  if (route.path === '') {\n    if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n      return {...noMatch};\n    }\n\n    return {\n      matched: true,\n      consumedSegments: [],\n      lastChild: 0,\n      parameters: {},\n      positionalParamSegments: {}\n    };\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n  if (!res) return {...noMatch};\n\n  const posParams: {[n: string]: string} = {};\n  forEach(res.posParams!, (v: UrlSegment, k: string) => {\n    posParams[k] = v.path;\n  });\n  const parameters = res.consumed.length > 0 ?\n      {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n      posParams;\n\n  return {\n    matched: true,\n    consumedSegments: res.consumed,\n    lastChild: res.consumed.length,\n    // TODO(atscott): investigate combining parameters and positionalParamSegments\n    parameters,\n    positionalParamSegments: res.posParams ?? {}\n  };\n}\n\nexport function split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[], relativeLinkResolution: 'legacy'|'corrected' = 'corrected') {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments,\n        createChildrenForEmptyPaths(\n            segmentGroup, consumedSegments, config,\n            new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments,\n        addEmptyPathsToChildrenIfNeeded(\n            segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children,\n            relativeLinkResolution));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments};\n  }\n\n  const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n  s._sourceSegment = segmentGroup;\n  s._segmentIndexShift = consumedSegments.length;\n  return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    routes: Route[], children: {[name: string]: UrlSegmentGroup},\n    relativeLinkResolution: 'legacy'|'corrected'): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  for (const r of routes) {\n    if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      if (relativeLinkResolution === 'legacy') {\n        s._segmentIndexShift = segmentGroup.segments.length;\n      } else {\n        s._segmentIndexShift = consumedSegments.length;\n      }\n      res[getOutlet(r)] = s;\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n    primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegment;\n  primarySegment._sourceSegment = segmentGroup;\n  primarySegment._segmentIndexShift = consumedSegments.length;\n\n  for (const r of routes) {\n    if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      s._segmentIndexShift = consumedSegments.length;\n      res[getOutlet(r)] = s;\n    }\n  }\n  return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '';\n}\n\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nexport function isImmediateMatch(\n    route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n  // a config like\n  // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n  // or even\n  // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n  //\n  // The exception here is when the segment outlet is for the primary outlet. This would\n  // result in a match inside the named outlet because all children there are written as primary\n  // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n  // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n  // This should only match if the url is `/(x:b)`.\n  if (getOutlet(route) !== outlet &&\n      (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n    return false;\n  }\n  if (route.path === '**') {\n    return true;\n  }\n  return match(rawSegment, route, segments).matched;\n}\n\nexport function noLeftoversInUrl(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  return segments.length === 0 && !segmentGroup.children[outlet];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, from, Observable, Observer, of} from 'rxjs';\nimport {catchError, concatMap, first, last, map, mergeMap, scan, tap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {prioritizedGuardValue} from './operators/prioritized_guard_value';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {navigationCancelingError, Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, wrapIntoObservable} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {isCanLoad, isFunction, isUrlTree} from './utils/type_guards';\n\nclass NoMatch {\n  public segmentGroup: UrlSegmentGroup|null;\n\n  constructor(segmentGroup?: UrlSegmentGroup) {\n    this.segmentGroup = segmentGroup || null;\n  }\n}\n\nclass AbsoluteRedirect {\n  constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n          `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n  return new Observable<LoadedRouterConfig>(\n      (obs: Observer<LoadedRouterConfig>) => obs.error(\n          navigationCancelingError(`Cannot load children because the guard of the route \"path: '${\n              route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n  return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n  private allowRedirects: boolean = true;\n  private ngModule: NgModuleRef<any>;\n\n  constructor(\n      moduleInjector: Injector, private configLoader: RouterConfigLoader,\n      private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n    this.ngModule = moduleInjector.get(NgModuleRef);\n  }\n\n  apply(): Observable<UrlTree> {\n    const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n    // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is\n    // only necessary to prevent failures in tests which assert exact object matches. The `split` is\n    // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these\n    // properties. Before the implementations were merged, the `applyRedirects` would not assign\n    // them. We should be able to remove this logic as a \"breaking change\" but should do some more\n    // investigation into the failures first.\n    const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children);\n\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    const urlTrees$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n    }));\n    return urlTrees$.pipe(catchError((e: any) => {\n      if (e instanceof AbsoluteRedirect) {\n        // After an absolute redirect we do not apply any more redirects!\n        // If this implementation changes, update the documentation note in `redirectTo`.\n        this.allowRedirects = false;\n        // we need to run matching, so we can fetch all lazy-loaded modules\n        return this.match(e.urlTree);\n      }\n\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private match(tree: UrlTree): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n    const mapped$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n    }));\n    return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private noMatchError(e: NoMatch): any {\n    return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n  }\n\n  private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string|null):\n      UrlTree {\n    const root = rootCandidate.segments.length > 0 ?\n        new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n        rootCandidate;\n    return new UrlTree(root, queryParams, fragment);\n  }\n\n  private expandSegmentGroup(\n      ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n      outlet: string): Observable<UrlSegmentGroup> {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.expandChildren(ngModule, routes, segmentGroup)\n          .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n    }\n\n    return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n  }\n\n  // Recursively expand segment groups for all the child outlets\n  private expandChildren(\n      ngModule: NgModuleRef<any>, routes: Route[],\n      segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n    // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n    // because an absolute redirect from the primary outlet takes precedence.\n    const childOutlets: string[] = [];\n    for (const child of Object.keys(segmentGroup.children)) {\n      if (child === 'primary') {\n        childOutlets.unshift(child);\n      } else {\n        childOutlets.push(child);\n      }\n    }\n\n    return from(childOutlets)\n        .pipe(\n            concatMap(childOutlet => {\n              const child = segmentGroup.children[childOutlet];\n              // Sort the routes so routes with outlets that match the segment appear\n              // first, followed by routes for other outlets, which might match if they have an\n              // empty path.\n              const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n              return this.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet)\n                  .pipe(map(s => ({segment: s, outlet: childOutlet})));\n            }),\n            scan(\n                (children, expandedChild) => {\n                  children[expandedChild.outlet] = expandedChild.segment;\n                  return children;\n                },\n                {} as {[outlet: string]: UrlSegmentGroup}),\n            last(),\n        );\n  }\n\n  private expandSegment(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n      segments: UrlSegment[], outlet: string,\n      allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    return from(routes).pipe(\n        concatMap((r: any) => {\n          const expanded$ = this.expandSegmentAgainstRoute(\n              ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n          return expanded$.pipe(catchError((e: any) => {\n            if (e instanceof NoMatch) {\n              return of(null);\n            }\n            throw e;\n          }));\n        }),\n        first((s): s is UrlSegmentGroup => !!s), catchError((e: any, _: any) => {\n          if (e instanceof EmptyError || e.name === 'EmptyError') {\n            if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n              return of(new UrlSegmentGroup([], {}));\n            }\n            throw new NoMatch(segmentGroup);\n          }\n          throw e;\n        }));\n  }\n\n  private expandSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n      return noMatch(segmentGroup);\n    }\n\n    if (route.redirectTo === undefined) {\n      return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet);\n    }\n\n    if (allowRedirects && this.allowRedirects) {\n      return this.expandSegmentAgainstRouteUsingRedirect(\n          ngModule, segmentGroup, routes, route, paths, outlet);\n    }\n\n    return noMatch(segmentGroup);\n  }\n\n  private expandSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n          ngModule, routes, route, outlet);\n    }\n\n    return this.expandRegularSegmentAgainstRouteUsingRedirect(\n        ngModule, segmentGroup, routes, route, segments, outlet);\n  }\n\n  private expandWildCardWithParamsAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n      outlet: string): Observable<UrlSegmentGroup> {\n    const newTree = this.applyRedirectCommands([], route.redirectTo!, {});\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      const group = new UrlSegmentGroup(newSegments, {});\n      return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n    }));\n  }\n\n  private expandRegularSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    const {matched, consumedSegments, lastChild, positionalParamSegments} =\n        match(segmentGroup, route, segments);\n    if (!matched) return noMatch(segmentGroup);\n\n    const newTree =\n        this.applyRedirectCommands(consumedSegments, route.redirectTo!, positionalParamSegments);\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      return this.expandSegment(\n          ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n          false);\n    }));\n  }\n\n  private matchSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      if (route.loadChildren) {\n        const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                              this.configLoader.load(ngModule.injector, route);\n        return loaded$.pipe(map((cfg: LoadedRouterConfig) => {\n          route._loadedConfig = cfg;\n          return new UrlSegmentGroup(segments, {});\n        }));\n      }\n\n      return of(new UrlSegmentGroup(segments, {}));\n    }\n\n    const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n    if (!matched) return noMatch(rawSegmentGroup);\n\n    const rawSlicedSegments = segments.slice(lastChild);\n    const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n    return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n      const childModule = routerConfig.module;\n      const childConfig = routerConfig.routes;\n\n      const {segmentGroup: splitSegmentGroup, slicedSegments} =\n          split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n      // See comment on the other call to `split` about why this is necessary.\n      const segmentGroup =\n          new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n\n      if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n        const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n        return expanded$.pipe(\n            map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n      }\n\n      if (childConfig.length === 0 && slicedSegments.length === 0) {\n        return of(new UrlSegmentGroup(consumedSegments, {}));\n      }\n\n      const matchedOnOutlet = getOutlet(route) === outlet;\n      const expanded$ = this.expandSegment(\n          childModule, segmentGroup, childConfig, slicedSegments,\n          matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n      return expanded$.pipe(\n          map((cs: UrlSegmentGroup) =>\n                  new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n    }));\n  }\n\n  private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n      Observable<LoadedRouterConfig> {\n    if (route.children) {\n      // The children belong to the same module\n      return of(new LoadedRouterConfig(route.children, ngModule));\n    }\n\n    if (route.loadChildren) {\n      // lazy children belong to the loaded module\n      if (route._loadedConfig !== undefined) {\n        return of(route._loadedConfig);\n      }\n\n      return this.runCanLoadGuards(ngModule.injector, route, segments)\n          .pipe(mergeMap((shouldLoadResult: boolean) => {\n            if (shouldLoadResult) {\n              return this.configLoader.load(ngModule.injector, route)\n                  .pipe(map((cfg: LoadedRouterConfig) => {\n                    route._loadedConfig = cfg;\n                    return cfg;\n                  }));\n            }\n            return canLoadFails(route);\n          }));\n    }\n\n    return of(new LoadedRouterConfig([], ngModule));\n  }\n\n  private runCanLoadGuards(moduleInjector: Injector, route: Route, segments: UrlSegment[]):\n      Observable<boolean> {\n    const canLoad = route.canLoad;\n    if (!canLoad || canLoad.length === 0) return of(true);\n\n    const canLoadObservables = canLoad.map((injectionToken: any) => {\n      const guard = moduleInjector.get(injectionToken);\n      let guardVal;\n      if (isCanLoad(guard)) {\n        guardVal = guard.canLoad(route, segments);\n      } else if (isFunction<CanLoadFn>(guard)) {\n        guardVal = guard(route, segments);\n      } else {\n        throw new Error('Invalid CanLoad guard');\n      }\n      return wrapIntoObservable(guardVal);\n    });\n\n    return of(canLoadObservables)\n        .pipe(\n            prioritizedGuardValue(),\n            tap((result: UrlTree|boolean) => {\n              if (!isUrlTree(result)) return;\n\n              const error: Error&{url?: UrlTree} = navigationCancelingError(\n                  `Redirecting to \"${this.urlSerializer.serialize(result)}\"`);\n              error.url = result;\n              throw error;\n            }),\n            map(result => result === true),\n        );\n  }\n\n  private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n    let res: UrlSegment[] = [];\n    let c = urlTree.root;\n    while (true) {\n      res = res.concat(c.segments);\n      if (c.numberOfChildren === 0) {\n        return of(res);\n      }\n\n      if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n        return namedOutletsRedirect(route.redirectTo!);\n      }\n\n      c = c.children[PRIMARY_OUTLET];\n    }\n  }\n\n  private applyRedirectCommands(\n      segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n    return this.applyRedirectCreatreUrlTree(\n        redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n  }\n\n  private applyRedirectCreatreUrlTree(\n      redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlTree {\n    const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n    return new UrlTree(\n        newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n        urlTree.fragment);\n  }\n\n  private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n    const res: Params = {};\n    forEach(redirectToParams, (v: any, k: string) => {\n      const copySourceValue = typeof v === 'string' && v.startsWith(':');\n      if (copySourceValue) {\n        const sourceName = v.substring(1);\n        res[k] = actualParams[sourceName];\n      } else {\n        res[k] = v;\n      }\n    });\n    return res;\n  }\n\n  private createSegmentGroup(\n      redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n    const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n    let children: {[n: string]: UrlSegmentGroup} = {};\n    forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n      children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n    });\n\n    return new UrlSegmentGroup(updatedSegments, children);\n  }\n\n  private createSegments(\n      redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n    return redirectToSegments.map(\n        s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n                                      this.findOrReturn(s, actualSegments));\n  }\n\n  private findPosParam(\n      redirectTo: string, redirectToUrlSegment: UrlSegment,\n      posParams: {[k: string]: UrlSegment}): UrlSegment {\n    const pos = posParams[redirectToUrlSegment.path.substring(1)];\n    if (!pos)\n      throw new Error(\n          `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n    return pos;\n  }\n\n  private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n    let idx = 0;\n    for (const s of actualSegments) {\n      if (s.path === redirectToUrlSegment.path) {\n        actualSegments.splice(idx);\n        return s;\n      }\n      idx++;\n    }\n    return redirectToUrlSegment;\n  }\n}\n\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n  if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n    const c = s.children[PRIMARY_OUTLET];\n    return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n  }\n\n  return s;\n}\n\n/**\n * Recursively merges primary segment children into their parents and also drops empty children\n * (those which have no segments and no children themselves). The latter prevents serializing a\n * group into something like `/a(aux:)`, where `aux` is an empty child segment.\n */\nfunction squashSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  const newChildren = {} as any;\n  for (const childOutlet of Object.keys(segmentGroup.children)) {\n    const child = segmentGroup.children[childOutlet];\n    const childCandidate = squashSegmentGroup(child);\n    // don't add empty children\n    if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n      newChildren[childOutlet] = childCandidate;\n    }\n  }\n  const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n  return mergeTrivialChildren(s);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n  return switchMap(\n      t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n               .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, equalParamsAndUrlSegments, RouterStateSnapshot} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport class CanActivate {\n  readonly route: ActivatedRouteSnapshot;\n  constructor(public path: ActivatedRouteSnapshot[]) {\n    this.route = this.path[this.path.length - 1];\n  }\n}\n\nexport class CanDeactivate {\n  constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n  canDeactivateChecks: CanDeactivate[],\n  canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n    future: RouterStateSnapshot, curr: RouterStateSnapshot,\n    parentContexts: ChildrenOutletContexts) {\n  const futureRoot = future._root;\n  const currRoot = curr ? curr._root : null;\n\n  return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n    {node: ActivatedRouteSnapshot, guards: any[]}|null {\n  const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n  if (!canActivateChild || canActivateChild.length === 0) return null;\n  return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n    token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n  const config = getClosestLoadedConfig(snapshot);\n  const injector = config ? config.module.injector : moduleInjector;\n  return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  if (!snapshot) return null;\n\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n  }\n\n  return null;\n}\n\nfunction getChildRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>|null,\n    contexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[], checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const prevChildren = nodeChildrenAsMap(currNode);\n\n  // Process the children of the future route\n  futureNode.children.forEach(c => {\n    getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n    delete prevChildren[c.value.outlet];\n  });\n\n  // Process any children left from the current route (not active for the future route)\n  forEach(\n      prevChildren,\n      (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n          deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks));\n\n  return checks;\n}\n\nfunction getRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n    parentContexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[],\n    checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const future = futureNode.value;\n  const curr = currNode ? currNode.value : null;\n  const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n  // reusing the node\n  if (curr && future.routeConfig === curr.routeConfig) {\n    const shouldRun =\n        shouldRunGuardsAndResolvers(curr, future, future.routeConfig!.runGuardsAndResolvers);\n    if (shouldRun) {\n      checks.canActivateChecks.push(new CanActivate(futurePath));\n    } else {\n      // we need to set the data\n      future.data = curr.data;\n      future._resolvedData = curr._resolvedData;\n    }\n\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(\n          futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n    }\n\n    if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n      checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n    }\n  } else {\n    if (curr) {\n      deactivateRouteAndItsChildren(currNode, context, checks);\n    }\n\n    checks.canActivateChecks.push(new CanActivate(futurePath));\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n    }\n  }\n\n  return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n    curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n    mode: RunGuardsAndResolvers|undefined): boolean {\n  if (typeof mode === 'function') {\n    return mode(curr, future);\n  }\n  switch (mode) {\n    case 'pathParamsChange':\n      return !equalPath(curr.url, future.url);\n\n    case 'pathParamsOrQueryParamsChange':\n      return !equalPath(curr.url, future.url) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'always':\n      return true;\n\n    case 'paramsOrQueryParamsChange':\n      return !equalParamsAndUrlSegments(curr, future) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'paramsChange':\n    default:\n      return !equalParamsAndUrlSegments(curr, future);\n  }\n}\n\nfunction deactivateRouteAndItsChildren(\n    route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext|null, checks: Checks): void {\n  const children = nodeChildrenAsMap(route);\n  const r = route.value;\n\n  forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n    if (!r.component) {\n      deactivateRouteAndItsChildren(node, context, checks);\n    } else if (context) {\n      deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n    } else {\n      deactivateRouteAndItsChildren(node, null, checks);\n    }\n  });\n\n  if (!r.component) {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  } else if (context && context.outlet && context.outlet.isActivated) {\n    checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n  } else {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {concat, defer, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n    MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n    if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n      return of({...t, guardsResult: true});\n    }\n\n    return runCanDeactivateChecks(\n               canDeactivateChecks, targetSnapshot!, currentSnapshot, moduleInjector)\n        .pipe(\n            mergeMap(canDeactivate => {\n              return canDeactivate && isBoolean(canDeactivate) ?\n                  runCanActivateChecks(\n                      targetSnapshot!, canActivateChecks, moduleInjector, forwardEvent) :\n                  of(canDeactivate);\n            }),\n            map(guardsResult => ({...t, guardsResult})));\n  });\n}\n\nfunction runCanDeactivateChecks(\n    checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n    moduleInjector: Injector) {\n  return from(checks).pipe(\n      mergeMap(\n          check =>\n              runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n    futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n    forwardEvent?: (evt: Event) => void) {\n  return from(checks).pipe(\n      concatMap((check: CanActivate) => {\n        return concat(\n            fireChildActivationStart(check.route.parent, forwardEvent),\n            fireActivationStart(check.route, forwardEvent),\n            runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n            runCanActivate(futureSnapshot, check.route, moduleInjector));\n      }),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ActivationStart(snapshot));\n  }\n  return of(true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ChildActivationStart(snapshot));\n  }\n  return of(true);\n}\n\nfunction runCanActivate(\n    futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n  if (!canActivate || canActivate.length === 0) return of(true);\n\n  const canActivateObservables = canActivate.map((c: any) => {\n    return defer(() => {\n      const guard = getToken(c, futureARS, moduleInjector);\n      let observable;\n      if (isCanActivate(guard)) {\n        observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n      } else if (isFunction<CanActivateFn>(guard)) {\n        observable = wrapIntoObservable(guard(futureARS, futureRSS));\n      } else {\n        throw new Error('Invalid CanActivate guard');\n      }\n      return observable.pipe(first());\n    });\n  });\n  return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n    futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const futureARS = path[path.length - 1];\n\n  const canActivateChildGuards = path.slice(0, path.length - 1)\n                                     .reverse()\n                                     .map(p => getCanActivateChild(p))\n                                     .filter(_ => _ !== null);\n\n  const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n    return defer(() => {\n      const guardsMapped = d.guards.map((c: any) => {\n        const guard = getToken(c, d.node, moduleInjector);\n        let observable;\n        if (isCanActivateChild(guard)) {\n          observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n        } else if (isFunction<CanActivateChildFn>(guard)) {\n          observable = wrapIntoObservable(guard(futureARS, futureRSS));\n        } else {\n          throw new Error('Invalid CanActivateChild guard');\n        }\n        return observable.pipe(first());\n      });\n      return of(guardsMapped).pipe(prioritizedGuardValue());\n    });\n  });\n  return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n    component: Object|null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n    futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n  if (!canDeactivate || canDeactivate.length === 0) return of(true);\n  const canDeactivateObservables = canDeactivate.map((c: any) => {\n    const guard = getToken(c, currARS, moduleInjector);\n    let observable;\n    if (isCanDeactivate(guard)) {\n      observable = wrapIntoObservable(guard.canDeactivate(component!, currARS, currRSS, futureRSS));\n    } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n      observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n    } else {\n      throw new Error('Invalid CanDeactivate guard');\n    }\n    return observable.pipe(first());\n  });\n  return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of} from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, ParamsInheritanceStrategy, RouterStateSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {last} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nfunction newObservableError(e: unknown): Observable<RouterStateSnapshot> {\n  // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n  return new Observable<RouterStateSnapshot>((obs: Observer<RouterStateSnapshot>) => obs.error(e));\n}\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Routes, urlTree: UrlTree, url: string,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n    relativeLinkResolution: 'legacy'|'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n  try {\n    const result = new Recognizer(\n                       rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n                       relativeLinkResolution)\n                       .recognize();\n    if (result === null) {\n      return newObservableError(new NoMatch());\n    } else {\n      return of(result);\n    }\n  } catch (e) {\n    // Catch the potential error from recognize due to duplicate outlet matches and return as an\n    // `Observable` error instead.\n    return newObservableError(e);\n  }\n}\n\nexport class Recognizer {\n  constructor(\n      private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n      private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n      private relativeLinkResolution: 'legacy'|'corrected') {}\n\n  recognize(): RouterStateSnapshot|null {\n    const rootSegmentGroup =\n        split(\n            this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined),\n            this.relativeLinkResolution)\n            .segmentGroup;\n\n    const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    if (children === null) {\n      return null;\n    }\n\n    // Use Object.freeze to prevent readers of the Router state from modifying it outside of a\n    // navigation, resulting in the router being out of sync with the browser.\n    const root = new ActivatedRouteSnapshot(\n        [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n        {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n\n    const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n    const routeState = new RouterStateSnapshot(this.url, rootNode);\n    this.inheritParamsAndData(routeState._root);\n    return routeState;\n  }\n\n  inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n    const route = routeNode.value;\n\n    const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n    route.params = Object.freeze(i.params);\n    route.data = Object.freeze(i.data);\n\n    routeNode.children.forEach(n => this.inheritParamsAndData(n));\n  }\n\n  processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.processChildren(config, segmentGroup);\n    }\n\n    return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n  }\n\n  /**\n   * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n   * we cannot find a match for _any_ of the children.\n   *\n   * @param config - The `Routes` to match against\n   * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n   *     config.\n   */\n  processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    const children: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n    for (const childOutlet of Object.keys(segmentGroup.children)) {\n      const child = segmentGroup.children[childOutlet];\n      // Sort the config so that routes with outlets that match the one being activated appear\n      // first, followed by routes for other outlets, which might match if they have an empty path.\n      const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n      const outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet);\n      if (outletChildren === null) {\n        // Configs must match all segment children so because we did not find a match for this\n        // outlet, return `null`.\n        return null;\n      }\n      children.push(...outletChildren);\n    }\n    // Because we may have matched two outlets to the same empty path segment, we can have multiple\n    // activated results for the same outlet. We should merge the children of these results so the\n    // final return value is only one `TreeNode` per outlet.\n    const mergedChildren = mergeEmptyPathMatches(children);\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      // This should really never happen - we are only taking the first match for each outlet and\n      // merge the empty path matches.\n      checkOutletNameUniqueness(mergedChildren);\n    }\n    sortActivatedRouteSnapshots(mergedChildren);\n    return mergedChildren;\n  }\n\n  processSegment(\n      config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    for (const r of config) {\n      const children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n      if (children !== null) {\n        return children;\n      }\n    }\n    if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n      return [];\n    }\n\n    return null;\n  }\n\n  processSegmentAgainstRoute(\n      route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return null;\n\n    let snapshot: ActivatedRouteSnapshot;\n    let consumedSegments: UrlSegment[] = [];\n    let rawSlicedSegments: UrlSegment[] = [];\n\n    if (route.path === '**') {\n      const params = segments.length > 0 ? last(segments)!.parameters : {};\n      snapshot = new ActivatedRouteSnapshot(\n          segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n          getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length,\n          getResolve(route));\n    } else {\n      const result = match(rawSegment, route, segments);\n      if (!result.matched) {\n        return null;\n      }\n      consumedSegments = result.consumedSegments;\n      rawSlicedSegments = segments.slice(result.lastChild);\n\n      snapshot = new ActivatedRouteSnapshot(\n          consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment, getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n    }\n\n    const childConfig: Route[] = getChildConfig(route);\n\n    const {segmentGroup, slicedSegments} = split(\n        rawSegment, consumedSegments, rawSlicedSegments,\n        // Filter out routes with redirectTo because we are trying to create activated route\n        // snapshots and don't handle redirects here. That should have been done in\n        // `applyRedirects`.\n        childConfig.filter(c => c.redirectTo === undefined), this.relativeLinkResolution);\n\n    if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n      const children = this.processChildren(childConfig, segmentGroup);\n      if (children === null) {\n        return null;\n      }\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n    }\n\n    if (childConfig.length === 0 && slicedSegments.length === 0) {\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n    }\n\n    const matchedOnOutlet = getOutlet(route) === outlet;\n    // If we matched a config due to empty path match on a different outlet, we need to continue\n    // passing the current outlet for the segment rather than switch to PRIMARY.\n    // Note that we switch to primary when we have a match because outlet configs look like this:\n    // {path: 'a', outlet: 'a', children: [\n    //  {path: 'b', component: B},\n    //  {path: 'c', component: C},\n    // ]}\n    // Notice that the children of the named outlet are configured with the primary outlet\n    const children = this.processSegment(\n        childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet);\n    if (children === null) {\n      return null;\n    }\n    return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n  }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  nodes.sort((a, b) => {\n    if (a.value.outlet === PRIMARY_OUTLET) return -1;\n    if (b.value.outlet === PRIMARY_OUTLET) return 1;\n    return a.value.outlet.localeCompare(b.value.outlet);\n  });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n  if (route.children) {\n    return route.children;\n  }\n\n  if (route.loadChildren) {\n    return route._loadedConfig!.routes;\n  }\n\n  return [];\n}\n\nfunction hasEmptyPathConfig(node: TreeNode<ActivatedRouteSnapshot>) {\n  const config = node.value.routeConfig;\n  return config && config.path === '' && config.redirectTo === undefined;\n}\n\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the\n * children from each duplicate. This is necessary because different outlets can match a single\n * empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes: Array<TreeNode<ActivatedRouteSnapshot>>):\n    Array<TreeNode<ActivatedRouteSnapshot>> {\n  const result: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n  // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n  const mergedNodes: Set<TreeNode<ActivatedRouteSnapshot>> = new Set();\n\n  for (const node of nodes) {\n    if (!hasEmptyPathConfig(node)) {\n      result.push(node);\n      continue;\n    }\n\n    const duplicateEmptyPathNode =\n        result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n    if (duplicateEmptyPathNode !== undefined) {\n      duplicateEmptyPathNode.children.push(...node.children);\n      mergedNodes.add(duplicateEmptyPathNode);\n    } else {\n      result.push(node);\n    }\n  }\n  // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n  // by also merging those children. This is necessary when there are multiple empty path configs in\n  // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n  // of those children can be combined into a single node as well.\n  for (const mergedNode of mergedNodes) {\n    const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n    result.push(new TreeNode(mergedNode.value, mergedChildren));\n  }\n  return result.filter(n => !mergedNodes.has(n));\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  const names: {[k: string]: ActivatedRouteSnapshot} = {};\n  nodes.forEach(n => {\n    const routeWithSameOutletName = names[n.value.outlet];\n    if (routeWithSameOutletName) {\n      const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n      const c = n.value.url.map(s => s.toString()).join('/');\n      throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n    }\n    names[n.value.outlet] = n.value;\n  });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  let s = segmentGroup;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n  }\n  return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n  let s = segmentGroup;\n  let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  }\n  return res - 1;\n}\n\nfunction getData(route: Route): Data {\n  return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n  return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Route[], serializer: (url: UrlTree) => string,\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    relativeLinkResolution: 'legacy'|'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(\n      t => recognizeFn(\n               rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n               paramsInheritanceStrategy, relativeLinkResolution)\n               .pipe(map(targetSnapshot => ({...t, targetSnapshot}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {EMPTY, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, map, mergeMap, takeLast, tap} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, RouterStateSnapshot} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n    if (!canActivateChecks.length) {\n      return of(t);\n    }\n    let canActivateChecksResolved = 0;\n    return from(canActivateChecks)\n        .pipe(\n            concatMap(\n                check => runResolve(\n                    check.route, targetSnapshot!, paramsInheritanceStrategy, moduleInjector)),\n            tap(() => canActivateChecksResolved++),\n            takeLast(1),\n            mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY),\n        );\n  });\n}\n\nfunction runResolve(\n    futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    paramsInheritanceStrategy: 'emptyOnly'|'always', moduleInjector: Injector) {\n  const resolve = futureARS._resolve;\n  return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n      .pipe(map((resolvedData: any) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = {\n          ...futureARS.data,\n          ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve\n        };\n        return null;\n      }));\n}\n\nfunction resolveNode(\n    resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const keys = Object.keys(resolve);\n  if (keys.length === 0) {\n    return of({});\n  }\n  const data: {[k: string]: any} = {};\n  return from(keys).pipe(\n      mergeMap(\n          (key: string) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n                               .pipe(tap((value: any) => {\n                                 data[key] = value;\n                               }))),\n      takeLast(1),\n      mergeMap(() => {\n        // Ensure all resolvers returned values, otherwise don't emit any \"next\" and just complete\n        // the chain which will cancel navigation\n        if (Object.keys(data).length === keys.length) {\n          return of(data);\n        }\n        return EMPTY;\n      }),\n  );\n}\n\nfunction getResolver(\n    injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const resolver = getToken(injectionToken, futureARS, moduleInjector);\n  return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n                            wrapIntoObservable(resolver(futureARS, futureRSS));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {from, MonoTypeOperatorFunction, ObservableInput, of} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n    MonoTypeOperatorFunction<T> {\n  return switchMap(v => {\n    const nextResult = next(v);\n    if (nextResult) {\n      return from(nextResult).pipe(map(() => v));\n    }\n    return of(v);\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n  contexts: Map<string, OutletContext>,\n  componentRef: ComponentRef<any>,\n  route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n  /** Determines if this route (and its subtree) should be detached to be reused later */\n  abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n  /**\n   * Stores the detached route.\n   *\n   * Storing a `null` value should erase the previously stored value.\n   */\n  abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n  /** Determines if this route (and its subtree) should be reattached */\n  abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n  /** Retrieves the previously stored route */\n  abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n  /** Determines if a route should be reused */\n  abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the fragment or query parameters change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nexport abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\n  /**\n   * Whether the given route should detach for later reuse.\n   * Always returns false for `BaseRouteReuseStrategy`.\n   * */\n  shouldDetach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /**\n   * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n   */\n  store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n\n  /** Returns `false`, meaning the route (and its subtree) is never reattached */\n  shouldAttach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /** Returns `null` because this strategy does not store routes for later re-use. */\n  retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null {\n    return null;\n  }\n\n  /**\n   * Determines if a route should be reused.\n   * This strategy returns `true` when the future route config and current route config are\n   * identical.\n   */\n  shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n    return future.routeConfig === curr.routeConfig;\n  }\n}\n\nexport class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectFlags, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {ConnectableObservable, from, Observable, of, Subject} from 'rxjs';\nimport {catchError, map, mergeMap, refCount, tap} from 'rxjs/operators';\n\nimport {LoadChildren, LoadedRouterConfig, Route} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\nimport {standardizeConfig} from './utils/config';\n\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n  constructor(\n      private loader: NgModuleFactoryLoader, private compiler: Compiler,\n      private onLoadStartListener?: (r: Route) => void,\n      private onLoadEndListener?: (r: Route) => void) {}\n\n  load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n    if (route._loader$) {\n      return route._loader$;\n    }\n\n    if (this.onLoadStartListener) {\n      this.onLoadStartListener(route);\n    }\n    const moduleFactory$ = this.loadModuleFactory(route.loadChildren!);\n    const loadRunner = moduleFactory$.pipe(\n        map((factory: NgModuleFactory<any>) => {\n          if (this.onLoadEndListener) {\n            this.onLoadEndListener(route);\n          }\n          const module = factory.create(parentInjector);\n          // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n          // will get stuck in an infinite loop. The child module's Injector will look to\n          // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n          // for it's parent module instead.\n          return new LoadedRouterConfig(\n              flatten(\n                  module.injector.get(ROUTES, undefined, InjectFlags.Self | InjectFlags.Optional))\n                  .map(standardizeConfig),\n              module);\n        }),\n        catchError((err) => {\n          route._loader$ = undefined;\n          throw err;\n        }),\n    );\n    // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n    route._loader$ = new ConnectableObservable(loadRunner, () => new Subject<LoadedRouterConfig>())\n                         .pipe(refCount());\n    return route._loader$;\n  }\n\n  private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n    if (typeof loadChildren === 'string') {\n      return from(this.loader.load(loadChildren));\n    } else {\n      return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n        if (t instanceof NgModuleFactory) {\n          return of(t);\n        } else {\n          return from(this.compiler.compileModuleAsync(t));\n        }\n      }));\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutletContract} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n  outlet: RouterOutletContract|null = null;\n  route: ActivatedRoute|null = null;\n  resolver: ComponentFactoryResolver|null = null;\n  children = new ChildrenOutletContexts();\n  attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n  // contexts for child outlets, by name.\n  private contexts = new Map<string, OutletContext>();\n\n  /** Called when a `RouterOutlet` directive is instantiated */\n  onChildOutletCreated(childName: string, outlet: RouterOutletContract): void {\n    const context = this.getOrCreateContext(childName);\n    context.outlet = outlet;\n    this.contexts.set(childName, context);\n  }\n\n  /**\n   * Called when a `RouterOutlet` directive is destroyed.\n   * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n   * re-created later.\n   */\n  onChildOutletDestroyed(childName: string): void {\n    const context = this.getContext(childName);\n    if (context) {\n      context.outlet = null;\n      context.attachRef = null;\n    }\n  }\n\n  /**\n   * Called when the corresponding route is deactivated during navigation.\n   * Because the component get destroyed, all children outlet are destroyed.\n   */\n  onOutletDeactivated(): Map<string, OutletContext> {\n    const contexts = this.contexts;\n    this.contexts = new Map();\n    return contexts;\n  }\n\n  onOutletReAttached(contexts: Map<string, OutletContext>) {\n    this.contexts = contexts;\n  }\n\n  getOrCreateContext(childName: string): OutletContext {\n    let context = this.getContext(childName);\n\n    if (!context) {\n      context = new OutletContext();\n      this.contexts.set(childName, context);\n    }\n\n    return context;\n  }\n\n  getContext(childName: string): OutletContext|null {\n    return this.contexts.get(childName) || null;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n  /**\n   * Tells the router if this URL should be processed.\n   *\n   * When it returns true, the router will execute the regular navigation.\n   * When it returns false, the router will set the router state to an empty state.\n   * As a result, all the active components will be destroyed.\n   *\n   */\n  abstract shouldProcessUrl(url: UrlTree): boolean;\n\n  /**\n   * Extracts the part of the URL that should be handled by the router.\n   * The rest of the URL will remain untouched.\n   */\n  abstract extract(url: UrlTree): UrlTree;\n\n  /**\n   * Merges the URL fragment with the rest of the URL.\n   */\n  abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n  shouldProcessUrl(url: UrlTree): boolean {\n    return true;\n  }\n  extract(url: UrlTree): UrlTree {\n    return url;\n  }\n  merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree {\n    return newUrlPart;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, PopStateEvent} from '@angular/common';\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, of, Subject, SubscriptionLike} from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, createEmptyState, RouterState, RouterStateSnapshot} from './router_state';\nimport {isNavigationCancelingError, navigationCancelingError, Params} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {containsTree, createEmptyUrlTree, IsActiveMatchOptions, UrlSerializer, UrlTree} from './url_tree';\nimport {standardizeConfig, validateConfig} from './utils/config';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n/**\n * @description\n *\n * Options that modify the `Router` URL.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface UrlCreationOptions {\n  /**\n   * Specifies a root URI to use for relative navigation.\n   *\n   * For example, consider the following route configuration where the parent route\n   * has two children.\n   *\n   * ```\n   * [{\n   *   path: 'parent',\n   *   component: ParentComponent,\n   *   children: [{\n   *     path: 'list',\n   *     component: ListComponent\n   *   },{\n   *     path: 'child',\n   *     component: ChildComponent\n   *   }]\n   * }]\n   * ```\n   *\n   * The following `go()` function navigates to the `list` route by\n   * interpreting the destination URI as relative to the activated `child`  route\n   *\n   * ```\n   *  @Component({...})\n   *  class ChildComponent {\n   *    constructor(private router: Router, private route: ActivatedRoute) {}\n   *\n   *    go() {\n   *      this.router.navigate(['../list'], { relativeTo: this.route });\n   *    }\n   *  }\n   * ```\n   *\n   * A value of `null` or `undefined` indicates that the navigation commands should be applied\n   * relative to the root.\n   */\n  relativeTo?: ActivatedRoute|null;\n\n  /**\n   * Sets query parameters to the URL.\n   *\n   * ```\n   * // Navigate to /results?page=1\n   * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n   * ```\n   */\n  queryParams?: Params|null;\n\n  /**\n   * Sets the hash fragment for the URL.\n   *\n   * ```\n   * // Navigate to /results#top\n   * this.router.navigate(['/results'], { fragment: 'top' });\n   * ```\n   */\n  fragment?: string;\n\n  /**\n   * How to handle query parameters in the router link for the next navigation.\n   * One of:\n   * * `preserve` : Preserve current parameters.\n   * * `merge` : Merge new with current parameters.\n   *\n   * The \"preserve\" option discards any new query params:\n   * ```\n   * // from /view1?page=1 to/view2?page=1\n   * this.router.navigate(['/view2'], { queryParams: { page: 2 },  queryParamsHandling: \"preserve\"\n   * });\n   * ```\n   * The \"merge\" option appends new query params to the params from the current URL:\n   * ```\n   * // from /view1?page=1 to/view2?page=1&otherKey=2\n   * this.router.navigate(['/view2'], { queryParams: { otherKey: 2 },  queryParamsHandling: \"merge\"\n   * });\n   * ```\n   * In case of a key collision between current parameters and those in the `queryParams` object,\n   * the new value is used.\n   *\n   */\n  queryParamsHandling?: QueryParamsHandling|null;\n\n  /**\n   * When true, preserves the URL fragment for the next navigation\n   *\n   * ```\n   * // Preserve fragment from /results#top to /view#top\n   * this.router.navigate(['/view'], { preserveFragment: true });\n   * ```\n   */\n  preserveFragment?: boolean;\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the navigation should be handled.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface NavigationBehaviorOptions {\n  /**\n   * When true, navigates without pushing a new state into history.\n   *\n   * ```\n   * // Navigate silently to /view\n   * this.router.navigate(['/view'], { skipLocationChange: true });\n   * ```\n   */\n  skipLocationChange?: boolean;\n\n  /**\n   * When true, navigates while replacing the current state in history.\n   *\n   * ```\n   * // Navigate to /view\n   * this.router.navigate(['/view'], { replaceUrl: true });\n   * ```\n   */\n  replaceUrl?: boolean;\n\n  /**\n   * Developer-defined state that can be passed to any navigation.\n   * Access this value through the `Navigation.extras` object\n   * returned from the [Router.getCurrentNavigation()\n   * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\n   *\n   * After a navigation completes, the router writes an object containing this\n   * value together with a `navigationId` to `history.state`.\n   * The value is written when `location.go()` or `location.replaceState()`\n   * is called before activating this route.\n   *\n   * Note that `history.state` does not pass an object equality test because\n   * the router adds the `navigationId` on each navigation.\n   *\n   */\n  state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed or interpreted.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n * @see UrlCreationOptions\n * @see NavigationBehaviorOptions\n *\n * @publicApi\n */\nexport interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {}\n\n/**\n * Error handler that is invoked when a navigation error occurs.\n *\n * If the handler returns a value, the navigation Promise is resolved with this value.\n * If the handler throws an exception, the navigation Promise is rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n  throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n    error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n  return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n  [k: string]: any,\n  // TODO(#27607): Remove `navigationId` and `ɵrouterPageId` and move to `ng` or `ɵ` namespace.\n  navigationId: number,\n  // The `ɵ` prefix is there to reduce the chance of colliding with any existing user properties on\n  // the history state.\n  ɵrouterPageId?: number,\n};\n\n/**\n * Information about a navigation operation.\n * Retrieve the most recent navigation object with the\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\n *\n * * *id* : The unique identifier of the current navigation.\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\n * This is the value before the router has parsed or applied redirects to it.\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\n * * *finalUrl* : The extracted URL after redirects have been applied.\n * This URL may not be available immediately, therefore this property can be `undefined`.\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\n * * *trigger* : Identifies how this navigation was triggered.\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n * -- 'popstate'--Triggered by a popstate event.\n * -- 'hashchange'--Triggered by a hashchange event.\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\n * navigation.\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\n * own `previousNavigation`.\n *\n * @publicApi\n */\nexport interface Navigation {\n  /**\n   * The unique identifier of the current navigation.\n   */\n  id: number;\n  /**\n   * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\n   * the value before the router has parsed or applied redirects to it.\n   */\n  initialUrl: string|UrlTree;\n  /**\n   * The initial target URL after being parsed with `UrlSerializer.extract()`.\n   */\n  extractedUrl: UrlTree;\n  /**\n   * The extracted URL after redirects have been applied.\n   * This URL may not be available immediately, therefore this property can be `undefined`.\n   * It is guaranteed to be set after the `RoutesRecognized` event fires.\n   */\n  finalUrl?: UrlTree;\n  /**\n   * Identifies how this navigation was triggered.\n   *\n   * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n   * * 'popstate'--Triggered by a popstate event.\n   * * 'hashchange'--Triggered by a hashchange event.\n   */\n  trigger: 'imperative'|'popstate'|'hashchange';\n  /**\n   * Options that controlled the strategy used for this navigation.\n   * See `NavigationExtras`.\n   */\n  extras: NavigationExtras;\n  /**\n   * The previously successful `Navigation` object. Only one previous navigation\n   * is available, therefore this previous `Navigation` object has a `null` value\n   * for its own `previousNavigation`.\n   */\n  previousNavigation: Navigation|null;\n}\n\nexport type NavigationTransition = {\n  id: number,\n  targetPageId: number,\n  currentUrlTree: UrlTree,\n  currentRawUrl: UrlTree,\n  extractedUrl: UrlTree,\n  urlAfterRedirects: UrlTree,\n  rawUrl: UrlTree,\n  extras: NavigationExtras,\n  resolve: any,\n  reject: any,\n  promise: Promise<boolean>,\n  source: NavigationTrigger,\n  restoredState: RestoredState|null,\n  currentSnapshot: RouterStateSnapshot,\n  targetSnapshot: RouterStateSnapshot|null,\n  currentRouterState: RouterState,\n  targetRouterState: RouterState|null,\n  guards: Checks,\n  guardsResult: boolean|UrlTree|null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}): Observable<void> {\n  return of(null) as any;\n}\n\n/**\n * Information related to a location change, necessary for scheduling follow-up Router navigations.\n */\ntype LocationChangeInfo = {\n  source: 'popstate'|'hashchange',\n  urlTree: UrlTree,\n  state: RestoredState|null,\n  transitionId: number\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nexport const exactMatchOptions: IsActiveMatchOptions = {\n  paths: 'exact',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'exact'\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nexport const subsetMatchOptions: IsActiveMatchOptions = {\n  paths: 'subset',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'subset'\n};\n\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Injectable()\nexport class Router {\n  /**\n   * Represents the activated `UrlTree` that the `Router` is configured to handle (through\n   * `UrlHandlingStrategy`). That is, after we find the route config tree that we're going to\n   * activate, run guards, and are just about to activate the route, we set the currentUrlTree.\n   *\n   * This should match the `browserUrlTree` when a navigation succeeds. If the\n   * `UrlHandlingStrategy.shouldProcessUrl` is `false`, only the `browserUrlTree` is updated.\n   */\n  private currentUrlTree: UrlTree;\n  /**\n   * Meant to represent the entire browser url after a successful navigation. In the life of a\n   * navigation transition:\n   * 1. The rawUrl represents the full URL that's being navigated to\n   * 2. We apply redirects, which might only apply to _part_ of the URL (due to\n   * `UrlHandlingStrategy`).\n   * 3. Right before activation (because we assume activation will succeed), we update the\n   * rawUrlTree to be a combination of the urlAfterRedirects (again, this might only apply to part\n   * of the initial url) and the rawUrl of the transition (which was the original navigation url in\n   * its full form).\n   */\n  private rawUrlTree: UrlTree;\n  /**\n   * Meant to represent the part of the browser url that the `Router` is set up to handle (via the\n   * `UrlHandlingStrategy`). This value is updated immediately after the browser url is updated (or\n   * the browser url update is skipped via `skipLocationChange`). With that, note that\n   * `browserUrlTree` _may not_ reflect the actual browser URL for two reasons:\n   *\n   * 1. `UrlHandlingStrategy` only handles part of the URL\n   * 2. `skipLocationChange` does not update the browser url.\n   *\n   * So to reiterate, `browserUrlTree` only represents the Router's internal understanding of the\n   * current route, either before guards with `urlUpdateStrategy === 'eager'` or right before\n   * activation with `'deferred'`.\n   *\n   * This should match the `currentUrlTree` when the navigation succeeds.\n   */\n  private browserUrlTree: UrlTree;\n  private readonly transitions: BehaviorSubject<NavigationTransition>;\n  private navigations: Observable<NavigationTransition>;\n  private lastSuccessfulNavigation: Navigation|null = null;\n  private currentNavigation: Navigation|null = null;\n  private disposed = false;\n\n  private locationSubscription?: SubscriptionLike;\n  /**\n   * Tracks the previously seen location change from the location subscription so we can compare\n   * the two latest to see if they are duplicates. See setUpLocationChangeListener.\n   */\n  private lastLocationChangeInfo: LocationChangeInfo|null = null;\n  private navigationId: number = 0;\n\n  /**\n   * The id of the currently active page in the router.\n   * Updated to the transition's target id on a successful navigation.\n   *\n   * This is used to track what page the router last activated. When an attempted navigation fails,\n   * the router can then use this to compute how to restore the state back to the previously active\n   * page.\n   */\n  private currentPageId: number = 0;\n  /**\n   * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n   * important for computing the target page id for new navigations because we need to ensure each\n   * page id in the browser history is 1 more than the previous entry.\n   */\n  private get browserPageId(): number|undefined {\n    return (this.location.getState() as RestoredState | null)?.ɵrouterPageId;\n  }\n  private configLoader: RouterConfigLoader;\n  private ngModule: NgModuleRef<any>;\n  private console: Console;\n  private isNgZoneEnabled: boolean = false;\n\n  /**\n   * An event stream for routing events in this NgModule.\n   */\n  public readonly events: Observable<Event> = new Subject<Event>();\n  /**\n   * The current state of routing in this NgModule.\n   */\n  public readonly routerState: RouterState;\n\n  /**\n   * A handler for navigation errors in this NgModule.\n   */\n  errorHandler: ErrorHandler = defaultErrorHandler;\n\n  /**\n   * A handler for errors thrown by `Router.parseUrl(url)`\n   * when `url` contains an invalid character.\n   * The most common case is a `%` sign\n   * that's not encoded and is not part of a percent encoded sequence.\n   */\n  malformedUriErrorHandler:\n      (error: URIError, urlSerializer: UrlSerializer,\n       url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n  /**\n   * True if at least one navigation event has occurred,\n   * false otherwise.\n   */\n  navigated: boolean = false;\n  private lastSuccessfulId: number = -1;\n\n  /**\n   * Hooks that enable you to pause navigation,\n   * either before or after the preactivation phase.\n   * Used by `RouterModule`.\n   *\n   * @internal\n   */\n  hooks: {\n    beforePreactivation: RouterHook,\n    afterPreactivation: RouterHook\n  } = {beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook};\n\n  /**\n   * A strategy for extracting and merging URLs.\n   * Used for AngularJS to Angular migrations.\n   */\n  urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n  /**\n   * A strategy for re-using routes.\n   */\n  routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n  /**\n   * How to handle a navigation request to the current URL. One of:\n   *\n   * - `'ignore'` :  The router ignores the request.\n   * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\n   *\n   * Note that this only configures whether the Route reprocesses the URL and triggers related\n   * action and events like redirects, guards, and resolvers. By default, the router re-uses a\n   * component instance when it re-navigates to the same component type without visiting a different\n   * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload\n   * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`\n   * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.\n   */\n  onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n  /**\n   * How to merge parameters, data, and resolved data from parent to child\n   * routes. One of:\n   *\n   * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n   * for path-less or component-less routes.\n   * - `'always'` : Inherit parent parameters, data, and resolved data\n   * for all child routes.\n   */\n  paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n  /**\n   * Determines when the router updates the browser URL.\n   * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n   * Set to `'eager'` to update the browser URL at the beginning of navigation.\n   * You can choose to update early so that, if navigation fails,\n   * you can show an error message with the URL that failed.\n   */\n  urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * @see `RouterModule`\n   */\n  relativeLinkResolution: 'legacy'|'corrected' = 'corrected';\n\n  /**\n   * Configures how the Router attempts to restore state when a navigation is cancelled.\n   *\n   * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n   * router before the navigation started.\n   *\n   * 'computed' - Will always return to the same state that corresponds to the actual Angular route\n   * when the navigation gets cancelled right after triggering a `popstate` event.\n   *\n   * The default value is `replace`\n   *\n   * @internal\n   */\n  // TODO(atscott): Determine how/when/if to make this public API\n  // This shouldn’t be an option at all but may need to be in order to allow migration without a\n  // breaking change. We need to determine if it should be made into public api (or if we forgo\n  // the option and release as a breaking change bug fix in a major version).\n  canceledNavigationResolution: 'replace'|'computed' = 'replace';\n\n  /**\n   * Creates the router service.\n   */\n  // TODO: vsavkin make internal after the final is out.\n  constructor(\n      private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n      private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n      loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n    const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n    const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.ngModule = injector.get(NgModuleRef);\n    this.console = injector.get(Console);\n    const ngZone = injector.get(NgZone);\n    this.isNgZoneEnabled = ngZone instanceof NgZone && NgZone.isInAngularZone();\n\n    this.resetConfig(config);\n    this.currentUrlTree = createEmptyUrlTree();\n    this.rawUrlTree = this.currentUrlTree;\n    this.browserUrlTree = this.currentUrlTree;\n\n    this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n    this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n    this.transitions = new BehaviorSubject<NavigationTransition>({\n      id: 0,\n      targetPageId: 0,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.currentUrlTree,\n      extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      rawUrl: this.currentUrlTree,\n      extras: {},\n      resolve: null,\n      reject: null,\n      promise: Promise.resolve(true),\n      source: 'imperative',\n      restoredState: null,\n      currentSnapshot: this.routerState.snapshot,\n      targetSnapshot: null,\n      currentRouterState: this.routerState,\n      targetRouterState: null,\n      guards: {canActivateChecks: [], canDeactivateChecks: []},\n      guardsResult: null,\n    });\n    this.navigations = this.setupNavigations(this.transitions);\n\n    this.processNavigations();\n  }\n\n  private setupNavigations(transitions: Observable<NavigationTransition>):\n      Observable<NavigationTransition> {\n    const eventsSubject = (this.events as Subject<Event>);\n    return transitions.pipe(\n               filter(t => t.id !== 0),\n\n               // Extract URL\n               map(t =>\n                       ({...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)} as\n                        NavigationTransition)),\n\n               // Using switchMap so we cancel executing navigations when a new one comes in\n               switchMap(t => {\n                 let completed = false;\n                 let errored = false;\n                 return of(t).pipe(\n                     // Store the Navigation object\n                     tap(t => {\n                       this.currentNavigation = {\n                         id: t.id,\n                         initialUrl: t.currentRawUrl,\n                         extractedUrl: t.extractedUrl,\n                         trigger: t.source,\n                         extras: t.extras,\n                         previousNavigation: this.lastSuccessfulNavigation ?\n                             {...this.lastSuccessfulNavigation, previousNavigation: null} :\n                             null\n                       };\n                     }),\n                     switchMap(t => {\n                       const browserUrlTree = this.browserUrlTree.toString();\n                       const urlTransition = !this.navigated ||\n                           t.extractedUrl.toString() !== browserUrlTree ||\n                           // Navigations which succeed or ones which fail and are cleaned up\n                           // correctly should result in `browserUrlTree` and `currentUrlTree`\n                           // matching. If this is not the case, assume something went wrong and try\n                           // processing the URL again.\n                           browserUrlTree !== this.currentUrlTree.toString();\n                       const processCurrentUrl =\n                           (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n                           this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n\n                       if (processCurrentUrl) {\n                         // If the source of the navigation is from a browser event, the URL is\n                         // already updated. We already need to sync the internal state.\n                         if (isBrowserTriggeredNavigation(t.source)) {\n                           this.browserUrlTree = t.extractedUrl;\n                         }\n                         return of(t).pipe(\n                             // Fire NavigationStart event\n                             switchMap(t => {\n                               const transition = this.transitions.getValue();\n                               eventsSubject.next(new NavigationStart(\n                                   t.id, this.serializeUrl(t.extractedUrl), t.source,\n                                   t.restoredState));\n                               if (transition !== this.transitions.getValue()) {\n                                 return EMPTY;\n                               }\n\n                               // This delay is required to match old behavior that forced\n                               // navigation to always be async\n                               return Promise.resolve(t);\n                             }),\n\n                             // ApplyRedirects\n                             applyRedirects(\n                                 this.ngModule.injector, this.configLoader, this.urlSerializer,\n                                 this.config),\n\n                             // Update the currentNavigation\n                             tap(t => {\n                               this.currentNavigation = {\n                                 ...this.currentNavigation!,\n                                 finalUrl: t.urlAfterRedirects\n                               };\n                             }),\n\n                             // Recognize\n                             recognize(\n                                 this.rootComponentType, this.config,\n                                 (url) => this.serializeUrl(url), this.paramsInheritanceStrategy,\n                                 this.relativeLinkResolution),\n\n                             // Update URL if in `eager` update mode\n                             tap(t => {\n                               if (this.urlUpdateStrategy === 'eager') {\n                                 if (!t.extras.skipLocationChange) {\n                                   this.setBrowserUrl(t.urlAfterRedirects, t);\n                                   // TODO(atscott): The above line is incorrect. It sets the url to\n                                   // only the part that is handled by the router. It should merge\n                                   // that with the rawUrl so the url includes segments not handled\n                                   // by the router:\n                                   //  const rawUrl = this.urlHandlingStrategy.merge(\n                                   //      t.urlAfterRedirects, t.rawUrl);\n                                   //  this.setBrowserUrl(rawUrl, t);\n                                 }\n                                 this.browserUrlTree = t.urlAfterRedirects;\n                               }\n\n                               // Fire RoutesRecognized\n                               const routesRecognized = new RoutesRecognized(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               eventsSubject.next(routesRecognized);\n                             }));\n                       } else {\n                         const processPreviousUrl = urlTransition && this.rawUrlTree &&\n                             this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n                         /* When the current URL shouldn't be processed, but the previous one was,\n                          * we handle this \"error condition\" by navigating to the previously\n                          * successful URL, but leaving the URL intact.*/\n                         if (processPreviousUrl) {\n                           const {id, extractedUrl, source, restoredState, extras} = t;\n                           const navStart = new NavigationStart(\n                               id, this.serializeUrl(extractedUrl), source, restoredState);\n                           eventsSubject.next(navStart);\n                           const targetSnapshot =\n                               createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n                           return of({\n                             ...t,\n                             targetSnapshot,\n                             urlAfterRedirects: extractedUrl,\n                             extras: {...extras, skipLocationChange: false, replaceUrl: false},\n                           });\n                         } else {\n                           /* When neither the current or previous URL can be processed, do nothing\n                            * other than update router's internal reference to the current \"settled\"\n                            * URL. This way the next navigation will be coming from the current URL\n                            * in the browser.\n                            */\n                           this.rawUrlTree = t.rawUrl;\n                           this.browserUrlTree = t.urlAfterRedirects;\n                           t.resolve(null);\n                           return EMPTY;\n                         }\n                       }\n                     }),\n\n                     // Before Preactivation\n                     switchTap(t => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.beforePreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     // --- GUARDS ---\n                     tap(t => {\n                       const guardsStart = new GuardsCheckStart(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                       this.triggerEvent(guardsStart);\n                     }),\n\n                     map(t => ({\n                           ...t,\n                           guards: getAllRouteGuards(\n                               t.targetSnapshot!, t.currentSnapshot, this.rootContexts)\n                         })),\n\n                     checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n                     tap(t => {\n                       if (isUrlTree(t.guardsResult)) {\n                         const error: Error&{url?: UrlTree} = navigationCancelingError(\n                             `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n                         error.url = t.guardsResult;\n                         throw error;\n                       }\n\n                       const guardsEnd = new GuardsCheckEnd(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!,\n                           !!t.guardsResult);\n                       this.triggerEvent(guardsEnd);\n                     }),\n\n                     filter(t => {\n                       if (!t.guardsResult) {\n                         this.restoreHistory(t);\n                         this.cancelNavigationTransition(t, '');\n                         return false;\n                       }\n                       return true;\n                     }),\n\n                     // --- RESOLVE ---\n                     switchTap(t => {\n                       if (t.guards.canActivateChecks.length) {\n                         return of(t).pipe(\n                             tap(t => {\n                               const resolveStart = new ResolveStart(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveStart);\n                             }),\n                             switchMap(t => {\n                               let dataResolved = false;\n                               return of(t).pipe(\n                                   resolveData(\n                                       this.paramsInheritanceStrategy, this.ngModule.injector),\n                                   tap({\n                                     next: () => dataResolved = true,\n                                     complete: () => {\n                                       if (!dataResolved) {\n                                         this.restoreHistory(t);\n                                         this.cancelNavigationTransition(\n                                             t,\n                                             `At least one route resolver didn't emit any value.`);\n                                       }\n                                     }\n                                   }),\n                               );\n                             }),\n                             tap(t => {\n                               const resolveEnd = new ResolveEnd(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveEnd);\n                             }));\n                       }\n                       return undefined;\n                     }),\n\n                     // --- AFTER PREACTIVATION ---\n                     switchTap((t: NavigationTransition) => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.afterPreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     map((t: NavigationTransition) => {\n                       const targetRouterState = createRouterState(\n                           this.routeReuseStrategy, t.targetSnapshot!, t.currentRouterState);\n                       return ({...t, targetRouterState});\n                     }),\n\n                     /* Once here, we are about to activate syncronously. The assumption is this\n                        will succeed, and user code may read from the Router service. Therefore\n                        before activation, we need to update router properties storing the current\n                        URL and the RouterState, as well as updated the browser URL. All this should\n                        happen *before* activating. */\n                     tap((t: NavigationTransition) => {\n                       this.currentUrlTree = t.urlAfterRedirects;\n                       this.rawUrlTree =\n                           this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n\n                       (this as {routerState: RouterState}).routerState = t.targetRouterState!;\n\n                       if (this.urlUpdateStrategy === 'deferred') {\n                         if (!t.extras.skipLocationChange) {\n                           this.setBrowserUrl(this.rawUrlTree, t);\n                         }\n                         this.browserUrlTree = t.urlAfterRedirects;\n                       }\n                     }),\n\n                     activateRoutes(\n                         this.rootContexts, this.routeReuseStrategy,\n                         (evt: Event) => this.triggerEvent(evt)),\n\n                     tap({\n                       next() {\n                         completed = true;\n                       },\n                       complete() {\n                         completed = true;\n                       }\n                     }),\n                     finalize(() => {\n                       /* When the navigation stream finishes either through error or success, we\n                        * set the `completed` or `errored` flag. However, there are some situations\n                        * where we could get here without either of those being set. For instance, a\n                        * redirect during NavigationStart. Therefore, this is a catch-all to make\n                        * sure the NavigationCancel\n                        * event is fired when a navigation gets cancelled but not caught by other\n                        * means. */\n                       if (!completed && !errored) {\n                         const cancelationReason = `Navigation ID ${\n                             t.id} is not equal to the current navigation id ${this.navigationId}`;\n                         if (this.canceledNavigationResolution === 'replace') {\n                           // Must reset to current URL tree here to ensure history.state is set. On\n                           // a fresh page load, if a new navigation comes in before a successful\n                           // navigation completes, there will be nothing in\n                           // history.state.navigationId. This can cause sync problems with\n                           // AngularJS sync code which looks for a value here in order to determine\n                           // whether or not to handle a given popstate event or to leave it to the\n                           // Angular router.\n                           this.restoreHistory(t);\n                           this.cancelNavigationTransition(t, cancelationReason);\n                         } else {\n                           // We cannot trigger a `location.historyGo` if the\n                           // cancellation was due to a new navigation before the previous could\n                           // complete. This is because `location.historyGo` triggers a `popstate`\n                           // which would also trigger another navigation. Instead, treat this as a\n                           // redirect and do not reset the state.\n                           this.cancelNavigationTransition(t, cancelationReason);\n                           // TODO(atscott): The same problem happens here with a fresh page load\n                           // and a new navigation before that completes where we won't set a page\n                           // id.\n                         }\n                       }\n                       // currentNavigation should always be reset to null here. If navigation was\n                       // successful, lastSuccessfulTransition will have already been set. Therefore\n                       // we can safely set currentNavigation to null here.\n                       this.currentNavigation = null;\n                     }),\n                     catchError((e) => {\n                       // TODO(atscott): The NavigationTransition `t` used here does not accurately\n                       // reflect the current state of the whole transition because some operations\n                       // return a new object rather than modifying the one in the outermost\n                       // `switchMap`.\n                       //  The fix can likely be to:\n                       //  1. Rename the outer `t` variable so it's not shadowed all the time and\n                       //  confusing\n                       //  2. Keep reassigning to the outer variable after each stage to ensure it\n                       //  gets updated. Or change the implementations to not return a copy.\n                       // Not changed yet because it affects existing code and would need to be\n                       // tested more thoroughly.\n                       errored = true;\n                       /* This error type is issued during Redirect, and is handled as a\n                        * cancellation rather than an error. */\n                       if (isNavigationCancelingError(e)) {\n                         const redirecting = isUrlTree(e.url);\n                         if (!redirecting) {\n                           // Set property only if we're not redirecting. If we landed on a page and\n                           // redirect to `/` route, the new navigation is going to see the `/`\n                           // isn't a change from the default currentUrlTree and won't navigate.\n                           // This is only applicable with initial navigation, so setting\n                           // `navigated` only when not redirecting resolves this scenario.\n                           this.navigated = true;\n                           this.restoreHistory(t, true);\n                         }\n                         const navCancel = new NavigationCancel(\n                             t.id, this.serializeUrl(t.extractedUrl), e.message);\n                         eventsSubject.next(navCancel);\n\n                         // When redirecting, we need to delay resolving the navigation\n                         // promise and push it to the redirect navigation\n                         if (!redirecting) {\n                           t.resolve(false);\n                         } else {\n                           // setTimeout is required so this navigation finishes with\n                           // the return EMPTY below. If it isn't allowed to finish\n                           // processing, there can be multiple navigations to the same\n                           // URL.\n                           setTimeout(() => {\n                             const mergedTree =\n                                 this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);\n                             const extras = {\n                               skipLocationChange: t.extras.skipLocationChange,\n                               // The URL is already updated at this point if we have 'eager' URL\n                               // updates or if the navigation was triggered by the browser (back\n                               // button, URL bar, etc). We want to replace that item in history if\n                               // the navigation is rejected.\n                               replaceUrl: this.urlUpdateStrategy === 'eager' ||\n                                   isBrowserTriggeredNavigation(t.source)\n                             };\n\n                             this.scheduleNavigation(\n                                 mergedTree, 'imperative', null, extras,\n                                 {resolve: t.resolve, reject: t.reject, promise: t.promise});\n                           }, 0);\n                         }\n\n                         /* All other errors should reset to the router's internal URL reference to\n                          * the pre-error state. */\n                       } else {\n                         this.restoreHistory(t, true);\n                         const navError =\n                             new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n                         eventsSubject.next(navError);\n                         try {\n                           t.resolve(this.errorHandler(e));\n                         } catch (ee) {\n                           t.reject(ee);\n                         }\n                       }\n                       return EMPTY;\n                     }));\n                 // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n               })) as any as Observable<NavigationTransition>;\n  }\n\n  /**\n   * @internal\n   * TODO: this should be removed once the constructor of the router made internal\n   */\n  resetRootComponentType(rootComponentType: Type<any>): void {\n    this.rootComponentType = rootComponentType;\n    // TODO: vsavkin router 4.0 should make the root component set to null\n    // this will simplify the lifecycle of the router.\n    this.routerState.root.component = this.rootComponentType;\n  }\n\n  private getTransition(): NavigationTransition {\n    const transition = this.transitions.value;\n    // TODO(atscott): This comment doesn't make it clear why this value needs to be set. In the case\n    // described below (where we don't handle previous or current url), the `browserUrlTree` is set\n    // to the `urlAfterRedirects` value. However, these values *are already the same* because of the\n    // line below. So it seems that we should be able to remove the line below and the line where\n    // `browserUrlTree` is updated when we aren't handling any part of the navigation url.\n    // Run TGP to confirm that this can be done.\n\n    // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n    // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n    // processing the previous URL.\n    transition.urlAfterRedirects = this.browserUrlTree;\n    return transition;\n  }\n\n  private setTransition(t: Partial<NavigationTransition>): void {\n    this.transitions.next({...this.getTransition(), ...t});\n  }\n\n  /**\n   * Sets up the location change listener and performs the initial navigation.\n   */\n  initialNavigation(): void {\n    this.setUpLocationChangeListener();\n    if (this.navigationId === 0) {\n      this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n    }\n  }\n\n  /**\n   * Sets up the location change listener. This listener detects navigations triggered from outside\n   * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n   * navigation so that the correct events, guards, etc. are triggered.\n   */\n  setUpLocationChangeListener(): void {\n    // Don't need to use Zone.wrap any more, because zone.js\n    // already patch onPopState, so location change callback will\n    // run into ngZone\n    if (!this.locationSubscription) {\n      this.locationSubscription = this.location.subscribe(event => {\n        const currentChange = this.extractLocationChangeInfoFromEvent(event);\n        // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n        // hybrid apps.\n        if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) {\n          setTimeout(() => {\n            const {source, state, urlTree} = currentChange;\n            const extras: NavigationExtras = {replaceUrl: true};\n            if (state) {\n              const stateCopy = {...state} as Partial<RestoredState>;\n              delete stateCopy.navigationId;\n              delete stateCopy.ɵrouterPageId;\n              if (Object.keys(stateCopy).length !== 0) {\n                extras.state = stateCopy;\n              }\n            }\n            this.scheduleNavigation(urlTree, source, state, extras);\n          }, 0);\n        }\n        this.lastLocationChangeInfo = currentChange;\n      });\n    }\n  }\n\n  /** Extracts router-related information from a `PopStateEvent`. */\n  private extractLocationChangeInfoFromEvent(change: PopStateEvent): LocationChangeInfo {\n    return {\n      source: change['type'] === 'popstate' ? 'popstate' : 'hashchange',\n      urlTree: this.parseUrl(change['url']!),\n      // Navigations coming from Angular router have a navigationId state\n      // property. When this exists, restore the state.\n      state: change.state?.navigationId ? change.state : null,\n      transitionId: this.getTransition().id\n    } as const;\n  }\n\n  /**\n   * Determines whether two events triggered by the Location subscription are due to the same\n   * navigation. The location subscription can fire two events (popstate and hashchange) for a\n   * single navigation. The second one should be ignored, that is, we should not schedule another\n   * navigation in the Router.\n   */\n  private shouldScheduleNavigation(previous: LocationChangeInfo|null, current: LocationChangeInfo):\n      boolean {\n    if (!previous) return true;\n\n    const sameDestination = current.urlTree.toString() === previous.urlTree.toString();\n    const eventsOccurredAtSameTime = current.transitionId === previous.transitionId;\n    if (!eventsOccurredAtSameTime || !sameDestination) {\n      return true;\n    }\n\n    if ((current.source === 'hashchange' && previous.source === 'popstate') ||\n        (current.source === 'popstate' && previous.source === 'hashchange')) {\n      return false;\n    }\n\n    return true;\n  }\n\n  /** The current URL. */\n  get url(): string {\n    return this.serializeUrl(this.currentUrlTree);\n  }\n\n  /**\n   * Returns the current `Navigation` object when the router is navigating,\n   * and `null` when idle.\n   */\n  getCurrentNavigation(): Navigation|null {\n    return this.currentNavigation;\n  }\n\n  /** @internal */\n  triggerEvent(event: Event): void {\n    (this.events as Subject<Event>).next(event);\n  }\n\n  /**\n   * Resets the route configuration used for navigation and generating links.\n   *\n   * @param config The route array for the new configuration.\n   *\n   * @usageNotes\n   *\n   * ```\n   * router.resetConfig([\n   *  { path: 'team/:id', component: TeamCmp, children: [\n   *    { path: 'simple', component: SimpleCmp },\n   *    { path: 'user/:name', component: UserCmp }\n   *  ]}\n   * ]);\n   * ```\n   */\n  resetConfig(config: Routes): void {\n    validateConfig(config);\n    this.config = config.map(standardizeConfig);\n    this.navigated = false;\n    this.lastSuccessfulId = -1;\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.dispose();\n  }\n\n  /** Disposes of the router. */\n  dispose(): void {\n    this.transitions.complete();\n    if (this.locationSubscription) {\n      this.locationSubscription.unsubscribe();\n      this.locationSubscription = undefined;\n    }\n    this.disposed = true;\n  }\n\n  /**\n   * Appends URL segments to the current URL tree to create a new URL tree.\n   *\n   * @param commands An array of URL fragments with which to construct the new URL tree.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\n   * property of the options object, if supplied.\n   * @param navigationExtras Options that control the navigation strategy.\n   * @returns The new URL tree.\n   *\n   * @usageNotes\n   *\n   * ```\n   * // create /team/33/user/11\n   * router.createUrlTree(['/team', 33, 'user', 11]);\n   *\n   * // create /team/33;expand=true/user/11\n   * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n   *\n   * // you can collapse static segments like this (this works only with the first passed-in value):\n   * router.createUrlTree(['/team/33/user', userId]);\n   *\n   * // If the first segment can contain slashes, and you do not want the router to split it,\n   * // you can do the following:\n   * router.createUrlTree([{segmentPath: '/one/two'}]);\n   *\n   * // create /team/33/(user/11//right:chat)\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n   *\n   * // remove the right secondary node\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n   *\n   * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n   *\n   * // navigate to /team/33/user/11/details\n   * router.createUrlTree(['details'], {relativeTo: route});\n   *\n   * // navigate to /team/33/user/22\n   * router.createUrlTree(['../22'], {relativeTo: route});\n   *\n   * // navigate to /team/44/user/22\n   * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n   *\n   * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n   * tree should be created relative to the root.\n   * ```\n   */\n  createUrlTree(commands: any[], navigationExtras: UrlCreationOptions = {}): UrlTree {\n    const {relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment} =\n        navigationExtras;\n    const a = relativeTo || this.routerState.root;\n    const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n    let q: Params|null = null;\n    switch (queryParamsHandling) {\n      case 'merge':\n        q = {...this.currentUrlTree.queryParams, ...queryParams};\n        break;\n      case 'preserve':\n        q = this.currentUrlTree.queryParams;\n        break;\n      default:\n        q = queryParams || null;\n    }\n    if (q !== null) {\n      q = this.removeEmptyProps(q);\n    }\n    return createUrlTree(a, this.currentUrlTree, commands, q, f ?? null);\n  }\n\n  /**\n   * Navigates to a view using an absolute route path.\n   *\n   * @param url An absolute path for a defined route. The function does not apply any delta to the\n   *     current URL.\n   * @param extras An object containing properties that modify the navigation strategy.\n   *\n   * @returns A Promise that resolves to 'true' when navigation succeeds,\n   * to 'false' when navigation fails, or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to an absolute path.\n   *\n   * ```\n   * router.navigateByUrl(\"/team/33/user/11\");\n   *\n   * // Navigate without updating the URL\n   * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigateByUrl(url: string|UrlTree, extras: NavigationBehaviorOptions = {\n    skipLocationChange: false\n  }): Promise<boolean> {\n    if (typeof ngDevMode === 'undefined' ||\n        ngDevMode && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n      this.console.warn(\n          `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n    }\n\n    const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n    const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n    return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n  }\n\n  /**\n   * Navigate based on the provided array of commands and a starting point.\n   * If no starting route is provided, the navigation is absolute.\n   *\n   * @param commands An array of URL fragments with which to construct the target URL.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\n   * of the options object, if supplied.\n   * @param extras An options object that determines how the URL should be constructed or\n   *     interpreted.\n   *\n   * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\n   *     fails,\n   * or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to a dynamic route path relative to the current URL.\n   *\n   * ```\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n   *\n   * // Navigate without updating the URL, overriding the default behavior\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    validateCommands(commands);\n    return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n  }\n\n  /** Serializes a `UrlTree` into a string */\n  serializeUrl(url: UrlTree): string {\n    return this.urlSerializer.serialize(url);\n  }\n\n  /** Parses a string into a `UrlTree` */\n  parseUrl(url: string): UrlTree {\n    let urlTree: UrlTree;\n    try {\n      urlTree = this.urlSerializer.parse(url);\n    } catch (e) {\n      urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n    }\n    return urlTree;\n  }\n\n  /**\n   * Returns whether the url is activated.\n   *\n   * @deprecated\n   * Use `IsActiveMatchOptions` instead.\n   *\n   * - The equivalent `IsActiveMatchOptions` for `true` is\n   * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.\n   * - The equivalent for `false` is\n   * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.\n   */\n  isActive(url: string|UrlTree, exact: boolean): boolean;\n  /**\n   * Returns whether the url is activated.\n   */\n  isActive(url: string|UrlTree, matchOptions: IsActiveMatchOptions): boolean;\n  /** @internal */\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean;\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean {\n    let options: IsActiveMatchOptions;\n    if (matchOptions === true) {\n      options = {...exactMatchOptions};\n    } else if (matchOptions === false) {\n      options = {...subsetMatchOptions};\n    } else {\n      options = matchOptions;\n    }\n    if (isUrlTree(url)) {\n      return containsTree(this.currentUrlTree, url, options);\n    }\n\n    const urlTree = this.parseUrl(url);\n    return containsTree(this.currentUrlTree, urlTree, options);\n  }\n\n  private removeEmptyProps(params: Params): Params {\n    return Object.keys(params).reduce((result: Params, key: string) => {\n      const value: any = params[key];\n      if (value !== null && value !== undefined) {\n        result[key] = value;\n      }\n      return result;\n    }, {});\n  }\n\n  private processNavigations(): void {\n    this.navigations.subscribe(\n        t => {\n          this.navigated = true;\n          this.lastSuccessfulId = t.id;\n          this.currentPageId = t.targetPageId;\n          (this.events as Subject<Event>)\n              .next(new NavigationEnd(\n                  t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n          this.lastSuccessfulNavigation = this.currentNavigation;\n          t.resolve(true);\n        },\n        e => {\n          this.console.warn(`Unhandled Navigation Error: ${e}`);\n        });\n  }\n\n  private scheduleNavigation(\n      rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n      extras: NavigationExtras,\n      priorPromise?: {resolve: any, reject: any, promise: Promise<boolean>}): Promise<boolean> {\n    if (this.disposed) {\n      return Promise.resolve(false);\n    }\n\n    // * Imperative navigations (router.navigate) might trigger additional navigations to the same\n    //   URL via a popstate event and the locationChangeListener. We should skip these duplicate\n    //   navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router\n    //   states.\n    // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If\n    //   the user follows that with a navigation using the back/forward button or manual URL change,\n    //   the destination may be the same as the previous imperative attempt. We should not skip\n    //   these navigations because it's a separate case from the one above -- it's not a duplicate\n    //   navigation.\n    const lastNavigation = this.getTransition();\n    // We don't want to skip duplicate successful navs if they're imperative because\n    // onSameUrlNavigation could be 'reload' (so the duplicate is intended).\n    const browserNavPrecededByRouterNav = isBrowserTriggeredNavigation(source) && lastNavigation &&\n        !isBrowserTriggeredNavigation(lastNavigation.source);\n    const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id;\n    // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison.\n    // However, if it failed, we should compare to the final result (urlAfterRedirects).\n    const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ?\n        lastNavigation.rawUrl :\n        lastNavigation.urlAfterRedirects;\n    const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();\n    if (browserNavPrecededByRouterNav && duplicateNav) {\n      return Promise.resolve(true);  // return value is not used\n    }\n\n    let resolve: any;\n    let reject: any;\n    let promise: Promise<boolean>;\n    if (priorPromise) {\n      resolve = priorPromise.resolve;\n      reject = priorPromise.reject;\n      promise = priorPromise.promise;\n\n    } else {\n      promise = new Promise<boolean>((res, rej) => {\n        resolve = res;\n        reject = rej;\n      });\n    }\n\n    const id = ++this.navigationId;\n    let targetPageId: number;\n    if (this.canceledNavigationResolution === 'computed') {\n      const isInitialPage = this.currentPageId === 0;\n      if (isInitialPage) {\n        restoredState = this.location.getState() as RestoredState | null;\n      }\n      // If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of\n      // `ɵrouterPageId`. This is the case for something like a page refresh where we assign the\n      // target id to the previously set value for that page.\n      if (restoredState && restoredState.ɵrouterPageId) {\n        targetPageId = restoredState.ɵrouterPageId;\n      } else {\n        // If we're replacing the URL or doing a silent navigation, we do not want to increment the\n        // page id because we aren't pushing a new entry to history.\n        if (extras.replaceUrl || extras.skipLocationChange) {\n          targetPageId = this.browserPageId ?? 0;\n        } else {\n          targetPageId = (this.browserPageId ?? 0) + 1;\n        }\n      }\n    } else {\n      // This is unused when `canceledNavigationResolution` is not computed.\n      targetPageId = 0;\n    }\n\n    this.setTransition({\n      id,\n      targetPageId,\n      source,\n      restoredState,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.rawUrlTree,\n      rawUrl,\n      extras,\n      resolve,\n      reject,\n      promise,\n      currentSnapshot: this.routerState.snapshot,\n      currentRouterState: this.routerState\n    });\n\n    // Make sure that the error is propagated even though `processNavigations` catch\n    // handler does not rethrow\n    return promise.catch((e: any) => {\n      return Promise.reject(e);\n    });\n  }\n\n  private setBrowserUrl(url: UrlTree, t: NavigationTransition) {\n    const path = this.urlSerializer.serialize(url);\n    const state = {...t.extras.state, ...this.generateNgRouterState(t.id, t.targetPageId)};\n    if (this.location.isCurrentPathEqualTo(path) || !!t.extras.replaceUrl) {\n      this.location.replaceState(path, '', state);\n    } else {\n      this.location.go(path, '', state);\n    }\n  }\n\n  /**\n   * Performs the necessary rollback action to restore the browser URL to the\n   * state before the transition.\n   */\n  private restoreHistory(t: NavigationTransition, restoringFromCaughtError = false) {\n    if (this.canceledNavigationResolution === 'computed') {\n      const targetPagePosition = this.currentPageId - t.targetPageId;\n      // The navigator change the location before triggered the browser event,\n      // so we need to go back to the current url if the navigation is canceled.\n      // Also, when navigation gets cancelled while using url update strategy eager, then we need to\n      // go back. Because, when `urlUpdateSrategy` is `eager`; `setBrowserUrl` method is called\n      // before any verification.\n      const browserUrlUpdateOccurred =\n          (t.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n           this.currentUrlTree === this.currentNavigation?.finalUrl);\n      if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n        this.location.historyGo(targetPagePosition);\n      } else if (\n          this.currentUrlTree === this.currentNavigation?.finalUrl && targetPagePosition === 0) {\n        // We got to the activation stage (where currentUrlTree is set to the navigation's\n        // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n        // We still need to reset the router state back to what it was when the navigation started.\n        this.resetState(t);\n        // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.\n        // Investigate if this can be done by running TGP.\n        this.browserUrlTree = t.currentUrlTree;\n        this.resetUrlToCurrentUrlTree();\n      } else {\n        // The browser URL and router state was not updated before the navigation cancelled so\n        // there's no restoration needed.\n      }\n    } else if (this.canceledNavigationResolution === 'replace') {\n      // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n      // for `deferred` navigations that haven't change the internal state yet because guards\n      // reject. For 'eager' navigations, it seems like we also really should reset the state\n      // because the navigation was cancelled. Investigate if this can be done by running TGP.\n      if (restoringFromCaughtError) {\n        this.resetState(t);\n      }\n      this.resetUrlToCurrentUrlTree();\n    }\n  }\n\n  private resetState(t: NavigationTransition): void {\n    (this as {routerState: RouterState}).routerState = t.currentRouterState;\n    this.currentUrlTree = t.currentUrlTree;\n    this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n  }\n\n  private resetUrlToCurrentUrlTree(): void {\n    this.location.replaceState(\n        this.urlSerializer.serialize(this.rawUrlTree), '',\n        this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n  }\n\n  private cancelNavigationTransition(t: NavigationTransition, reason: string) {\n    const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), reason);\n    this.triggerEvent(navCancel);\n    t.resolve(false);\n  }\n\n  private generateNgRouterState(navigationId: number, routerPageId?: number) {\n    if (this.canceledNavigationResolution === 'computed') {\n      return {navigationId, ɵrouterPageId: routerPageId};\n    }\n    return {navigationId};\n  }\n}\n\nfunction validateCommands(commands: string[]): void {\n  for (let i = 0; i < commands.length; i++) {\n    const cmd = commands[i];\n    if (cmd == null) {\n      throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n    }\n  }\n}\n\nfunction isBrowserTriggeredNavigation(source: 'imperative'|'popstate'|'hashchange') {\n  return source !== 'imperative';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {Params} from '../shared';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segements.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink implements OnChanges {\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private preserve!: boolean;\n\n  /** @internal */\n  onChanges = new Subject<RouterLink>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n    if (tabIndex == null) {\n      renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges) {\n    // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n    // to the RouterLinks it's tracking.\n    this.onChanges.next(this);\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  @HostListener('click')\n  onClick(): boolean {\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state,\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return true;\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @HostBinding('attr.target') @Input() target!: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private subscription: Subscription;\n  // TODO(issue/24571): remove '!'.\n  private preserve!: boolean;\n\n  // the url displayed on the anchor element.\n  // TODO(issue/24571): remove '!'.\n  @HostBinding() href!: string;\n\n  /** @internal */\n  onChanges = new Subject<RouterLinkWithHref>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      private locationStrategy: LocationStrategy) {\n    this.subscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.updateTargetUrlAndHref();\n      }\n    });\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): any {\n    this.updateTargetUrlAndHref();\n    this.onChanges.next(this);\n  }\n  /** @nodoc */\n  ngOnDestroy(): any {\n    this.subscription.unsubscribe();\n  }\n\n  /** @nodoc */\n  @HostListener(\n      'click',\n      ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'])\n  onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean):\n      boolean {\n    if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n      return true;\n    }\n\n    if (typeof this.target === 'string' && this.target != '_self') {\n      return true;\n    }\n\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return false;\n  }\n\n  private updateTargetUrlAndHref(): void {\n    this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\nfunction attrBoolValue(s: any): boolean {\n  return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, Optional, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {from, of, Subscription} from 'rxjs';\nimport {mergeAll} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {IsActiveMatchOptions} from '../url_tree';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLinkActive]',\n  exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n  @ContentChildren(RouterLink, {descendants: true}) links!: QueryList<RouterLink>;\n  @ContentChildren(RouterLinkWithHref, {descendants: true})\n  linksWithHrefs!: QueryList<RouterLinkWithHref>;\n\n  private classes: string[] = [];\n  private routerEventsSubscription: Subscription;\n  private linkInputChangesSubscription?: Subscription;\n  public readonly isActive: boolean = false;\n\n  /**\n   * Options to configure how to determine if the router link is active.\n   *\n   * These options are passed to the `Router.isActive()` function.\n   *\n   * @see Router.isActive\n   */\n  @Input() routerLinkActiveOptions: {exact: boolean}|IsActiveMatchOptions = {exact: false};\n\n\n  constructor(\n      private router: Router, private element: ElementRef, private renderer: Renderer2,\n      private readonly cdr: ChangeDetectorRef, @Optional() private link?: RouterLink,\n      @Optional() private linkWithHref?: RouterLinkWithHref) {\n    this.routerEventsSubscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.update();\n      }\n    });\n  }\n\n  /** @nodoc */\n  ngAfterContentInit(): void {\n    // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n    of(this.links.changes, this.linksWithHrefs.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n      this.update();\n      this.subscribeToEachLinkOnChanges();\n    });\n  }\n\n  private subscribeToEachLinkOnChanges() {\n    this.linkInputChangesSubscription?.unsubscribe();\n    const allLinkChanges =\n        [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref]\n            .filter((link): link is RouterLink|RouterLinkWithHref => !!link)\n            .map(link => link.onChanges);\n    this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n      if (this.isActive !== this.isLinkActive(this.router)(link)) {\n        this.update();\n      }\n    });\n  }\n\n  @Input()\n  set routerLinkActive(data: string[]|string) {\n    const classes = Array.isArray(data) ? data : data.split(' ');\n    this.classes = classes.filter(c => !!c);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    this.update();\n  }\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.routerEventsSubscription.unsubscribe();\n    this.linkInputChangesSubscription?.unsubscribe();\n  }\n\n  private update(): void {\n    if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n    Promise.resolve().then(() => {\n      const hasActiveLinks = this.hasActiveLinks();\n      if (this.isActive !== hasActiveLinks) {\n        (this as any).isActive = hasActiveLinks;\n        this.cdr.markForCheck();\n        this.classes.forEach((c) => {\n          if (hasActiveLinks) {\n            this.renderer.addClass(this.element.nativeElement, c);\n          } else {\n            this.renderer.removeClass(this.element.nativeElement, c);\n          }\n        });\n      }\n    });\n  }\n\n  private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n    const options: boolean|IsActiveMatchOptions =\n        isActiveMatchOptions(this.routerLinkActiveOptions) ?\n        this.routerLinkActiveOptions :\n        // While the types should disallow `undefined` here, it's possible without strict inputs\n        (this.routerLinkActiveOptions.exact || false);\n    return (link: RouterLink|RouterLinkWithHref) => router.isActive(link.urlTree, options);\n  }\n\n  private hasActiveLinks(): boolean {\n    const isActiveCheckFn = this.isLinkActive(this.router);\n    return this.link && isActiveCheckFn(this.link) ||\n        this.linkWithHref && isActiveCheckFn(this.linkWithHref) ||\n        this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);\n  }\n}\n\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options: {exact: boolean}|\n                              IsActiveMatchOptions): options is IsActiveMatchOptions {\n  return !!(options as IsActiveMatchOptions).paths;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef,} from '@angular/core';\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * An interface that defines the contract for developing a component outlet for the `Router`.\n *\n * An outlet acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * A router outlet should register itself with the `Router` via\n * `ChildrenOutletContexts#onChildOutletCreated` and unregister with\n * `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,\n * it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.\n *\n * @see `ChildrenOutletContexts`\n * @publicApi\n */\nexport interface RouterOutletContract {\n  /**\n   * Whether the given outlet is activated.\n   *\n   * An outlet is considered \"activated\" if it has an active component.\n   */\n  isActivated: boolean;\n\n  /** The instance of the activated component or `null` if the outlet is not activated. */\n  component: Object|null;\n\n  /**\n   * The `Data` of the `ActivatedRoute` snapshot.\n   */\n  activatedRouteData: Data;\n\n  /**\n   * The `ActivatedRoute` for the outlet or `null` if the outlet is not activated.\n   */\n  activatedRoute: ActivatedRoute|null;\n\n  /**\n   * Called by the `Router` when the outlet should activate (create a component).\n   */\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null): void;\n\n  /**\n   * A request to destroy the currently activated component.\n   *\n   * When a `RouteReuseStrategy` indicates that an `ActivatedRoute` should be removed but stored for\n   * later re-use rather than destroyed, the `Router` will call `detach` instead.\n   */\n  deactivate(): void;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree.\n   *\n   * This is similar to `deactivate`, but the activated component should _not_ be destroyed.\n   * Instead, it is returned so that it can be reattached later via the `attach` method.\n   */\n  detach(): ComponentRef<unknown>;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree.\n   */\n  attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;\n\n  /**\n   * Emits an activate event when a new component is instantiated\n   **/\n  activateEvents?: EventEmitter<unknown>;\n\n  /**\n   * Emits a deactivate event when a component is destroyed.\n   */\n  deactivateEvents?: EventEmitter<unknown>;\n}\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {\n  private activated: ComponentRef<any>|null = null;\n  private _activatedRoute: ActivatedRoute|null = null;\n  private name: string;\n\n  @Output('activate') activateEvents = new EventEmitter<any>();\n  @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n  constructor(\n      private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n      private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n      private changeDetector: ChangeDetectorRef) {\n    this.name = name || PRIMARY_OUTLET;\n    parentContexts.onChildOutletCreated(this.name, this);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.parentContexts.onChildOutletDestroyed(this.name);\n  }\n\n  /** @nodoc */\n  ngOnInit(): void {\n    if (!this.activated) {\n      // If the outlet was not instantiated at the time the route got activated we need to populate\n      // the outlet when it is initialized (ie inside a NgIf)\n      const context = this.parentContexts.getContext(this.name);\n      if (context && context.route) {\n        if (context.attachRef) {\n          // `attachRef` is populated when there is an existing component to mount\n          this.attach(context.attachRef, context.route);\n        } else {\n          // otherwise the component defined in the configuration is created\n          this.activateWith(context.route, context.resolver || null);\n        }\n      }\n    }\n  }\n\n  get isActivated(): boolean {\n    return !!this.activated;\n  }\n\n  /**\n   * @returns The currently activated component instance.\n   * @throws An error if the outlet is not activated.\n   */\n  get component(): Object {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this.activated.instance;\n  }\n\n  get activatedRoute(): ActivatedRoute {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this._activatedRoute as ActivatedRoute;\n  }\n\n  get activatedRouteData(): Data {\n    if (this._activatedRoute) {\n      return this._activatedRoute.snapshot.data;\n    }\n    return {};\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree\n   */\n  detach(): ComponentRef<any> {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    this.location.detach();\n    const cmp = this.activated;\n    this.activated = null;\n    this._activatedRoute = null;\n    return cmp;\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n   */\n  attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n    this.activated = ref;\n    this._activatedRoute = activatedRoute;\n    this.location.insert(ref.hostView);\n  }\n\n  deactivate(): void {\n    if (this.activated) {\n      const c = this.component;\n      this.activated.destroy();\n      this.activated = null;\n      this._activatedRoute = null;\n      this.deactivateEvents.emit(c);\n    }\n  }\n\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n    if (this.isActivated) {\n      throw new Error('Cannot activate an already activated outlet');\n    }\n    this._activatedRoute = activatedRoute;\n    const snapshot = activatedRoute._futureSnapshot;\n    const component = <any>snapshot.routeConfig!.component;\n    resolver = resolver || this.resolver;\n    const factory = resolver.resolveComponentFactory(component);\n    const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n    const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n    this.activated = this.location.createComponent(factory, this.location.length, injector);\n    // Calling `markForCheck` to make sure we will run the change detection when the\n    // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n    this.changeDetector.markForCheck();\n    this.activateEvents.emit(this.activated.instance);\n  }\n}\n\nclass OutletInjector implements Injector {\n  constructor(\n      private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n      private parent: Injector) {}\n\n  get(token: any, notFoundValue?: any): any {\n    if (token === ActivatedRoute) {\n      return this.route;\n    }\n\n    if (token === ChildrenOutletContexts) {\n      return this.childContexts;\n    }\n\n    return this.parent.get(token, notFoundValue);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {from, Observable, of, Subscription} from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n  abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return fn().pipe(catchError(() => of(null)));\n  }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return of(null);\n  }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n  private loader: RouterConfigLoader;\n  private subscription?: Subscription;\n\n  constructor(\n      private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n      private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n    const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n    const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n  }\n\n  setUpPreloading(): void {\n    this.subscription =\n        this.router.events\n            .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n            .subscribe(() => {});\n  }\n\n  preload(): Observable<any> {\n    const ngModule = this.injector.get(NgModuleRef);\n    return this.processRoutes(ngModule, this.router.config);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this.subscription) {\n      this.subscription.unsubscribe();\n    }\n  }\n\n  private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n    const res: Observable<any>[] = [];\n    for (const route of routes) {\n      // we already have the config loaded, just recurse\n      if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n        const childConfig = route._loadedConfig;\n        res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n        // no config loaded, fetch the config\n      } else if (route.loadChildren && !route.canLoad) {\n        res.push(this.preloadConfig(ngModule, route));\n\n        // recurse into children\n      } else if (route.children) {\n        res.push(this.processRoutes(ngModule, route.children));\n      }\n    }\n    return from(res).pipe(mergeAll(), map((_) => void 0));\n  }\n\n  private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n    return this.preloadingStrategy.preload(route, () => {\n      const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                            this.loader.load(ngModule.injector, route);\n      return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n        route._loadedConfig = config;\n        return this.processRoutes(config.module, config.routes);\n      }));\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {Injectable, OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\n@Injectable()\nexport class RouterScroller implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  private routerEventsSubscription!: Unsubscribable;\n  // TODO(issue/24571): remove '!'.\n  private scrollEventsSubscription!: Unsubscribable;\n\n  private lastId = 0;\n  private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n  private restoredId = 0;\n  private store: {[key: string]: [number, number]} = {};\n\n  constructor(\n      private router: Router,\n      /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n        scrollPositionRestoration?: 'disabled'|'enabled'|'top',\n        anchorScrolling?: 'disabled'|'enabled'\n      } = {}) {\n    // Default both options to 'disabled'\n    options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n    options.anchorScrolling = options.anchorScrolling || 'disabled';\n  }\n\n  init(): void {\n    // we want to disable the automatic scrolling because having two places\n    // responsible for scrolling results race conditions, especially given\n    // that browser don't implement this behavior consistently\n    if (this.options.scrollPositionRestoration !== 'disabled') {\n      this.viewportScroller.setHistoryScrollRestoration('manual');\n    }\n    this.routerEventsSubscription = this.createScrollEvents();\n    this.scrollEventsSubscription = this.consumeScrollEvents();\n  }\n\n  private createScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (e instanceof NavigationStart) {\n        // store the scroll position of the current stable navigations.\n        this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n        this.lastSource = e.navigationTrigger;\n        this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n      } else if (e instanceof NavigationEnd) {\n        this.lastId = e.id;\n        this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n      }\n    });\n  }\n\n  private consumeScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (!(e instanceof Scroll)) return;\n      // a popstate event. The pop state event will always ignore anchor scrolling.\n      if (e.position) {\n        if (this.options.scrollPositionRestoration === 'top') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        } else if (this.options.scrollPositionRestoration === 'enabled') {\n          this.viewportScroller.scrollToPosition(e.position);\n        }\n        // imperative navigation \"forward\"\n      } else {\n        if (e.anchor && this.options.anchorScrolling === 'enabled') {\n          this.viewportScroller.scrollToAnchor(e.anchor);\n        } else if (this.options.scrollPositionRestoration !== 'disabled') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        }\n      }\n    });\n  }\n\n  private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n    this.router.triggerEvent(new Scroll(\n        routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n  }\n\n  /** @nodoc */\n  ngOnDestroy() {\n    if (this.routerEventsSubscription) {\n      this.routerEventsSubscription.unsubscribe();\n    }\n    if (this.scrollEventsSubscription) {\n      this.scrollEventsSubscription.unsubscribe();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, Location, LOCATION_INITIALIZED, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, OnDestroy, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {of, Subject} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {Event} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES =\n    [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n  Location,\n  {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n  {\n    provide: Router,\n    useFactory: setupRouter,\n    deps: [\n      UrlSerializer, ChildrenOutletContexts, Location, Injector, NgModuleFactoryLoader, Compiler,\n      ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n      [RouteReuseStrategy, new Optional()]\n    ]\n  },\n  ChildrenOutletContexts,\n  {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n  {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n  RouterPreloader,\n  NoPreloading,\n  PreloadAllModules,\n  {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n  return new NgProbeToken('Router', Router);\n}\n\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/router) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\n@NgModule({\n  declarations: ROUTER_DIRECTIVES,\n  exports: ROUTER_DIRECTIVES,\n  entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n  // Note: We are injecting the Router so it gets created eagerly...\n  constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n  /**\n   * Creates and configures a module with all the router providers and directives.\n   * Optionally sets up an application listener to perform an initial navigation.\n   *\n   * When registering the NgModule at the root, import as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forRoot(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the application.\n   * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n   * @return The new `NgModule`.\n   *\n   */\n  static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [\n        ROUTER_PROVIDERS,\n        provideRoutes(routes),\n        {\n          provide: ROUTER_FORROOT_GUARD,\n          useFactory: provideForRootGuard,\n          deps: [[Router, new Optional(), new SkipSelf()]]\n        },\n        {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n        {\n          provide: LocationStrategy,\n          useFactory: provideLocationStrategy,\n          deps:\n              [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]\n        },\n        {\n          provide: RouterScroller,\n          useFactory: createRouterScroller,\n          deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n        },\n        {\n          provide: PreloadingStrategy,\n          useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n                                                             NoPreloading\n        },\n        {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n        provideRouterInitializer(),\n      ],\n    };\n  }\n\n  /**\n   * Creates a module with all the router directives and a provider registering routes,\n   * without creating a new Router service.\n   * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forChild(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n   * @return The new NgModule.\n   *\n   */\n  static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n    return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n  }\n}\n\nexport function createRouterScroller(\n    router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n  if (config.scrollOffset) {\n    viewportScroller.setOffset(config.scrollOffset);\n  }\n  return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n    platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n  return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n                           new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n  if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n    throw new Error(\n        `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n  }\n  return 'guarded';\n}\n\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n *   imports: [RouterModule.forChild(ROUTES)],\n *   providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n  return [\n    {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n    {provide: ROUTES, multi: true, useValue: routes},\n  ];\n}\n\n/**\n * Allowed values in an `ExtraOptions` object that configure\n * when the router performs the initial navigation operation.\n *\n * * 'enabledNonBlocking' - (default) The initial navigation starts after the\n * root component has been created. The bootstrap is not blocked on the completion of the initial\n * navigation.\n * * 'enabledBlocking' - The initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete. This value is required\n * for [server-side rendering](guide/universal) to work.\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\n * the root component gets created. Use if there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic.\n *\n * The following values have been [deprecated](guide/releases#deprecation-practices) since v11,\n * and should not be used for new applications.\n *\n * * 'enabled' - This option is 1:1 replaceable with `enabledBlocking`.\n *\n * @see `forRoot()`\n *\n * @publicApi\n */\nexport type InitialNavigation = 'disabled'|'enabled'|'enabledBlocking'|'enabledNonBlocking';\n\n/**\n * A set of configuration options for a router module, provided in the\n * `forRoot()` method.\n *\n * @see `forRoot()`\n *\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n  /**\n   * When true, log all internal navigation events to the console.\n   * Use for debugging.\n   */\n  enableTracing?: boolean;\n\n  /**\n   * When true, enable the location strategy that uses the URL fragment\n   * instead of the history API.\n   */\n  useHash?: boolean;\n\n  /**\n   * One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.\n   * When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root\n   * component is created. The bootstrap is blocked until the initial navigation is complete. This\n   * value is required for [server-side rendering](guide/universal) to work. When set to\n   * `enabledNonBlocking`, the initial navigation starts after the root component has been created.\n   * The bootstrap is not blocked on the completion of the initial navigation. When set to\n   * `disabled`, the initial navigation is not performed. The location listener is set up before the\n   * root component gets created. Use if there is a reason to have more control over when the router\n   * starts its initial navigation due to some complex initialization logic.\n   */\n  initialNavigation?: InitialNavigation;\n\n  /**\n   * A custom error handler for failed navigations.\n   * If the handler returns a value, the navigation Promise is resolved with this value.\n   * If the handler throws an exception, the navigation Promise is rejected with the exception.\n   *\n   */\n  errorHandler?: ErrorHandler;\n\n  /**\n   * Configures a preloading strategy.\n   * One of `PreloadAllModules` or `NoPreloading` (the default).\n   */\n  preloadingStrategy?: any;\n\n  /**\n   * Define what the router should do if it receives a navigation request to the current URL.\n   * Default is `ignore`, which causes the router ignores the navigation.\n   * This can disable features such as a \"refresh\" button.\n   * Use this option to configure the behavior when navigating to the\n   * current URL. Default is 'ignore'.\n   */\n  onSameUrlNavigation?: 'reload'|'ignore';\n\n  /**\n   * Configures if the scroll position needs to be restored when navigating back.\n   *\n   * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\n   * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\n   * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\n   * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\n   * navigation). This option will be the default in the future.\n   *\n   * You can implement custom scroll restoration behavior by adapting the enabled behavior as\n   * in the following example.\n   *\n   * ```typescript\n   * class AppModule {\n   *   constructor(router: Router, viewportScroller: ViewportScroller) {\n   *     router.events.pipe(\n   *       filter((e: Event): e is Scroll => e instanceof Scroll)\n   *     ).subscribe(e => {\n   *       if (e.position) {\n   *         // backward navigation\n   *         viewportScroller.scrollToPosition(e.position);\n   *       } else if (e.anchor) {\n   *         // anchor navigation\n   *         viewportScroller.scrollToAnchor(e.anchor);\n   *       } else {\n   *         // forward navigation\n   *         viewportScroller.scrollToPosition([0, 0]);\n   *       }\n   *     });\n   *   }\n   * }\n   * ```\n   */\n  scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n  /**\n   * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\n   * Anchor scrolling is disabled by default.\n   *\n   * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n   * that we stored or scroll to the top.\n   */\n  anchorScrolling?: 'disabled'|'enabled';\n\n  /**\n   * Configures the scroll offset the router will use when scrolling to an element.\n   *\n   * When given a tuple with x and y position value,\n   * the router uses that offset each time it scrolls.\n   * When given a function, the router invokes the function every time\n   * it restores scroll position.\n   */\n  scrollOffset?: [number, number]|(() => [number, number]);\n\n  /**\n   * Defines how the router merges parameters, data, and resolved data from parent to child\n   * routes. By default ('emptyOnly'), inherits parent parameters only for\n   * path-less or component-less routes.\n   *\n   * Set to 'always' to enable unconditional inheritance of parent parameters.\n   *\n   * Note that when dealing with matrix parameters, \"parent\" refers to the parent `Route`\n   * config which does not necessarily mean the \"URL segment to the left\". When the `Route` `path`\n   * contains multiple segments, the matrix parameters must appear on the last segment. For example,\n   * matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not\n   * `a;foo=bar/b`.\n   *\n   */\n  paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n  /**\n   * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\n   * invalid character sequences.\n   * The default implementation is to redirect to the root URL, dropping\n   * any path or parameter information. The function takes three parameters:\n   *\n   * - `'URIError'` - Error thrown when parsing a bad URL.\n   * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n   * - `'url'` -  The malformed URL that caused the URIError\n   * */\n  malformedUriErrorHandler?:\n      (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n  /**\n   * Defines when the router updates the browser URL. By default ('deferred'),\n   * update after successful navigation.\n   * Set to 'eager' if prefer to update the URL at the beginning of navigation.\n   * Updating the URL early allows you to handle a failure of navigation by\n   * showing an error message with the URL that failed.\n   */\n  urlUpdateStrategy?: 'deferred'|'eager';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * Example:\n   *\n   * ```\n   * const routes = [\n   *   {\n   *     path: '',\n   *     component: ContainerComponent,\n   *     children: [\n   *       { path: 'a', component: AComponent },\n   *       { path: 'b', component: BComponent },\n   *     ]\n   *   }\n   * ];\n   * ```\n   *\n   * From the `ContainerComponent`, you should be able to navigate to `AComponent` using\n   * the following `routerLink`, but it will not work if `relativeLinkResolution` is set\n   * to `'legacy'`:\n   *\n   * `<a [routerLink]=\"['./a']\">Link to A</a>`\n   *\n   * However, this will work:\n   *\n   * `<a [routerLink]=\"['../a']\">Link to A</a>`\n   *\n   * In other words, you're required to use `../` rather than `./` when the relative link\n   * resolution is set to `'legacy'`.\n   *\n   * The default in v11 is `corrected`.\n   */\n  relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n    urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n    injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][],\n    opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n    routeReuseStrategy?: RouteReuseStrategy) {\n  const router = new Router(\n      null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n  if (urlHandlingStrategy) {\n    router.urlHandlingStrategy = urlHandlingStrategy;\n  }\n\n  if (routeReuseStrategy) {\n    router.routeReuseStrategy = routeReuseStrategy;\n  }\n\n  assignExtraOptionsToRouter(opts, router);\n\n  if (opts.enableTracing) {\n    router.events.subscribe((e: Event) => {\n      // tslint:disable:no-console\n      console.group?.(`Router Event: ${(<any>e.constructor).name}`);\n      console.log(e.toString());\n      console.log(e);\n      console.groupEnd?.();\n      // tslint:enable:no-console\n    });\n  }\n\n  return router;\n}\n\nexport function assignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void {\n  if (opts.errorHandler) {\n    router.errorHandler = opts.errorHandler;\n  }\n\n  if (opts.malformedUriErrorHandler) {\n    router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n  }\n\n  if (opts.onSameUrlNavigation) {\n    router.onSameUrlNavigation = opts.onSameUrlNavigation;\n  }\n\n  if (opts.paramsInheritanceStrategy) {\n    router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n  }\n\n  if (opts.relativeLinkResolution) {\n    router.relativeLinkResolution = opts.relativeLinkResolution;\n  }\n\n  if (opts.urlUpdateStrategy) {\n    router.urlUpdateStrategy = opts.urlUpdateStrategy;\n  }\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n  return router.routerState.root;\n}\n\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer implements OnDestroy {\n  private initNavigation = false;\n  private destroyed = false;\n  private resultOfPreactivationDone = new Subject<void>();\n\n  constructor(private injector: Injector) {}\n\n  appInitializer(): Promise<any> {\n    const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n    return p.then(() => {\n      // If the injector was destroyed, the DI lookups below will fail.\n      if (this.destroyed) {\n        return Promise.resolve(true);\n      }\n\n      let resolve: Function = null!;\n      const res = new Promise(r => resolve = r);\n      const router = this.injector.get(Router);\n      const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n      if (opts.initialNavigation === 'disabled') {\n        router.setUpLocationChangeListener();\n        resolve(true);\n      } else if (\n          // TODO: enabled is deprecated as of v11, can be removed in v13\n          opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') {\n        router.hooks.afterPreactivation = () => {\n          // only the initial navigation should be delayed\n          if (!this.initNavigation) {\n            this.initNavigation = true;\n            resolve(true);\n            return this.resultOfPreactivationDone;\n\n            // subsequent navigations should not be delayed\n          } else {\n            return of(null) as any;\n          }\n        };\n        router.initialNavigation();\n      } else {\n        resolve(true);\n      }\n\n      return res;\n    });\n  }\n\n  bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n    const opts = this.injector.get(ROUTER_CONFIGURATION);\n    const preloader = this.injector.get(RouterPreloader);\n    const routerScroller = this.injector.get(RouterScroller);\n    const router = this.injector.get(Router);\n    const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n\n    // Default case\n    if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) {\n      router.initialNavigation();\n    }\n\n    preloader.setUpPreloading();\n    routerScroller.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    this.resultOfPreactivationDone.next(null!);\n    this.resultOfPreactivationDone.complete();\n  }\n\n  ngOnDestroy() {\n    this.destroyed = true;\n  }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n  return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n  return r.bootstrapListener.bind(r);\n}\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n    new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer(): ReadonlyArray<Provider> {\n  return [\n    RouterInitializer,\n    {\n      provide: APP_INITIALIZER,\n      multi: true,\n      useFactory: getAppInitializer,\n      deps: [RouterInitializer]\n    },\n    {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n  ];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('12.2.9');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, DeprecatedLoadChildren, LoadChildren, LoadChildrenCallback, QueryParamsHandling, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatcher, UrlMatchResult} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet, RouterOutletContract} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {BaseRouteReuseStrategy, DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationBehaviorOptions, NavigationExtras, Router, UrlCreationOptions} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, InitialNavigation, provideRoutes, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, IsActiveMatchOptions, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {EmptyOutletComponent as ɵangular_packages_router_router_l} from './src/components/empty_outlet';\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_o} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_m,TreeNode as ɵangular_packages_router_router_n} from './src/utils/tree';"],"names":["isObservable","isPromise","EmptyOutletComponent","noMatch","last","applyRedirects","applyRedirectsFn","NoMatch","recognize","recognizeFn","Console"],"mappings":";;;;;;;;;;;AAAA;;;;;;;AAsBA;;;;;;;;;;;;;;;;;;;;;;;;MAwBa,WAAW;IACtB;;IAEW,EAAU;;IAEV,GAAW;QAFX,OAAE,GAAF,EAAE,CAAQ;QAEV,QAAG,GAAH,GAAG,CAAQ;KAAI;CAC3B;AAED;;;;;MAKa,eAAgB,SAAQ,WAAW;IA8B9C;;IAEI,EAAU;;IAEV,GAAW;;IAEX,oBAA0D,YAAY;;IAEtE,gBAA+D,IAAI;QACrE,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;KACpC;;IAGQ,QAAQ;QACf,OAAO,uBAAuB,IAAI,CAAC,EAAE,WAAW,IAAI,CAAC,GAAG,IAAI,CAAC;KAC9D;CACF;AAED;;;;;;;;;MASa,aAAc,SAAQ,WAAW;IAC5C;;IAEI,EAAU;;IAEV,GAAW;;IAEJ,iBAAyB;QAClC,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QADN,sBAAiB,GAAjB,iBAAiB,CAAQ;KAEnC;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AC,iBAAiB,CAAC,EAAC;QAC1F,EAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAC;KAChF,CAAC;AACJ;;ACjmBA;;;;;;;AAgBA;;;MAGa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;ACnBtD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;AAeA;;ACfA;;;;;;;;ACAA;;;;;;"}
+{"version":3,"file":"router.js","sources":["../../../../../../packages/router/src/events.ts","../../../../../../packages/router/src/shared.ts","../../../../../../packages/router/src/utils/collection.ts","../../../../../../packages/router/src/url_tree.ts","../../../../../../packages/router/src/utils/tree.ts","../../../../../../packages/router/src/router_state.ts","../../../../../../packages/router/src/create_router_state.ts","../../../../../../packages/router/src/create_url_tree.ts","../../../../../../packages/router/src/operators/activate_routes.ts","../../../../../../packages/router/src/config.ts","../../../../../../packages/router/src/utils/type_guards.ts","../../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../../packages/router/src/components/empty_outlet.ts","../../../../../../packages/router/src/utils/config.ts","../../../../../../packages/router/src/utils/config_matching.ts","../../../../../../packages/router/src/apply_redirects.ts","../../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../../packages/router/src/utils/preactivation.ts","../../../../../../packages/router/src/operators/check_guards.ts","../../../../../../packages/router/src/recognize.ts","../../../../../../packages/router/src/operators/recognize.ts","../../../../../../packages/router/src/operators/resolve_data.ts","../../../../../../packages/router/src/operators/switch_tap.ts","../../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../../packages/router/src/router_config_loader.ts","../../../../../../packages/router/src/router_outlet_context.ts","../../../../../../packages/router/src/url_handling_strategy.ts","../../../../../../packages/router/src/router.ts","../../../../../../packages/router/src/directives/router_link.ts","../../../../../../packages/router/src/directives/router_link_active.ts","../../../../../../packages/router/src/directives/router_outlet.ts","../../../../../../packages/router/src/router_preloader.ts","../../../../../../packages/router/src/router_scroller.ts","../../../../../../packages/router/src/router_module.ts","../../../../../../packages/router/src/version.ts","../../../../../../packages/router/src/private_export.ts","../../../../../../packages/router/src/index.ts","../../../../../../packages/router/public_api.ts","../../../../../../packages/router/index.ts","../../../../../../packages/router/router.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * Identifies the call or event that triggered a navigation.\n *\n * * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.\n * * 'popstate' : Triggered by a `popstate` event.\n * * 'hashchange'-: Triggered by a `hashchange` event.\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative'|'popstate'|'hashchange';\n\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n *   constructor(public router: Router) {\n *     router.events.pipe(\n *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n *     ).subscribe((e: RouterEvent) => {\n *       // Do something\n *     });\n *   }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router-reference#router-events)\n * @publicApi\n */\nexport class RouterEvent {\n  constructor(\n      /** A unique ID that the router assigns to every router navigation. */\n      public id: number,\n      /** The URL that is the destination for this navigation. */\n      public url: string) {}\n}\n\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n  /**\n   * Identifies the call or event that triggered the navigation.\n   * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n   *\n   * @see `NavigationEnd`\n   * @see `NavigationCancel`\n   * @see `NavigationError`\n   */\n  navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n  /**\n   * The navigation state that was previously supplied to the `pushState` call,\n   * when the navigation is triggered by a `popstate` event. Otherwise null.\n   *\n   * The state object is defined by `NavigationExtras`, and contains any\n   * developer-defined state value, as well as a unique ID that\n   * the router assigns to every router transition/navigation.\n   *\n   * From the perspective of the router, the router never \"goes back\".\n   * When the user clicks on the back button in the browser,\n   * a new navigation ID is created.\n   *\n   * Use the ID in this previous-state object to differentiate between a newly created\n   * state and one returned to by a `popstate` event, so that you can restore some\n   * remembered state, such as scroll position.\n   *\n   */\n  restoredState?: {[k: string]: any, navigationId: number}|null;\n\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n      /** @docsNotRequired */\n      restoredState: {[k: string]: any, navigationId: number}|null = null) {\n    super(id, url);\n    this.navigationTrigger = navigationTrigger;\n    this.restoredState = restoredState;\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public reason: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationCancel`\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public error: any) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n  }\n}\n\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot,\n      /** @docsNotRequired */\n      public shouldActivate: boolean) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see `ResolveEnd`\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadStart(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadEnd(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see  `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart`\n * @publicApi\n */\nexport class ChildActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nexport class Scroll {\n  constructor(\n      /** @docsNotRequired */\n      readonly routerEvent: NavigationEnd,\n\n      /** @docsNotRequired */\n      readonly position: [number, number]|null,\n\n      /** @docsNotRequired */\n      readonly anchor: string|null) {}\n\n  toString(): string {\n    const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n    return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n  }\n}\n\n/**\n * Router events that allow you to track the lifecycle of the router.\n *\n * The events occur in the following sequence:\n *\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\n * the router [lazy loads](/guide/router#lazy-loading) a route configuration.\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\n * and the routes are recognized.\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\n * phase of routing.\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\n * begins activating a route's children.\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\n * phase of routing successfully.\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\n * phase of routing.\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\n * phase of routing successfully.\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\n * activating a route's children.\n * * [ActivationEnd](api/router/ActivationEnd): When the router finishes activating a route.\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\n * * [NavigationError](api/router/NavigationError): When navigation fails\n * due to an unexpected error.\n * * [Scroll](api/router/Scroll): When the user scrolls.\n *\n * @publicApi\n */\nexport type Event = RouterEvent|RouteConfigLoadStart|RouteConfigLoadEnd|ChildActivationStart|\n    ChildActivationEnd|ActivationStart|ActivationEnd|Scroll;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of matrix and query URL parameters.\n * @see `convertToParamMap()`\n * @see `ParamMap`\n *\n * @publicApi\n */\nexport type Params = {\n  [key: string]: any;\n};\n\n/**\n * A map that provides access to the required and optional parameters\n * specific to a route.\n * The map supports retrieving a single value with `get()`\n * or multiple values with `getAll()`.\n *\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n *\n * @publicApi\n */\nexport interface ParamMap {\n  /**\n   * Reports whether the map contains a given parameter.\n   * @param name The parameter name.\n   * @returns True if the map contains the given parameter, false otherwise.\n   */\n  has(name: string): boolean;\n  /**\n   * Retrieves a single value for a parameter.\n   * @param name The parameter name.\n   * @return The parameter's single value,\n   * or the first value if the parameter has multiple values,\n   * or `null` when there is no such parameter.\n   */\n  get(name: string): string|null;\n  /**\n   * Retrieves multiple values for a parameter.\n   * @param name The parameter name.\n   * @return An array containing one or more values,\n   * or an empty array if there is no such parameter.\n   *\n   */\n  getAll(name: string): string[];\n\n  /** Names of the parameters in the map. */\n  readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n  private params: Params;\n\n  constructor(params: Params) {\n    this.params = params || {};\n  }\n\n  has(name: string): boolean {\n    return Object.prototype.hasOwnProperty.call(this.params, name);\n  }\n\n  get(name: string): string|null {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v[0] : v;\n    }\n\n    return null;\n  }\n\n  getAll(name: string): string[] {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v : [v];\n    }\n\n    return [];\n  }\n\n  get keys(): string[] {\n    return Object.keys(this.params);\n  }\n}\n\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n  return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n  const error = Error('NavigationCancelingError: ' + message);\n  (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n  return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n  return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n    segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n  const parts = route.path!.split('/');\n\n  if (parts.length > segments.length) {\n    // The actual URL is shorter than the config, no match\n    return null;\n  }\n\n  if (route.pathMatch === 'full' &&\n      (segmentGroup.hasChildren() || parts.length < segments.length)) {\n    // The config is longer than the actual URL but we are looking for a full match, return null\n    return null;\n  }\n\n  const posParams: {[key: string]: UrlSegment} = {};\n\n  // Check each config part against the actual URL\n  for (let index = 0; index < parts.length; index++) {\n    const part = parts[index];\n    const segment = segments[index];\n    const isParameter = part.startsWith(':');\n    if (isParameter) {\n      posParams[part.substring(1)] = segment;\n    } else if (part !== segment.path) {\n      // The actual URL part does not match the config, no match\n      return null;\n    }\n  }\n\n  return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {from, Observable, of} from 'rxjs';\n\nimport {Params} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; ++i) {\n    if (!shallowEqual(a[i], b[i])) return false;\n  }\n  return true;\n}\n\nexport function shallowEqual(a: Params, b: Params): boolean {\n  // While `undefined` should never be possible, it would sometimes be the case in IE 11\n  // and pre-chromium Edge. The check below accounts for this edge case.\n  const k1 = a ? Object.keys(a) : undefined;\n  const k2 = b ? Object.keys(b) : undefined;\n  if (!k1 || !k2 || k1.length != k2.length) {\n    return false;\n  }\n  let key: string;\n  for (let i = 0; i < k1.length; i++) {\n    key = k1[i];\n    if (!equalArraysOrString(a[key], b[key])) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Test equality for arrays of strings or a string.\n */\nexport function equalArraysOrString(a: string|string[], b: string|string[]) {\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    const aSorted = [...a].sort();\n    const bSorted = [...b].sort();\n    return aSorted.every((val, index) => bSorted[index] === val);\n  } else {\n    return a === b;\n  }\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n  return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n  return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n  return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n  for (const prop in map) {\n    if (map.hasOwnProperty(prop)) {\n      callback(map[prop], prop);\n    }\n  }\n}\n\nexport function wrapIntoObservable<T>(value: T|Promise<T>|Observable<T>): Observable<T> {\n  if (isObservable(value)) {\n    return value;\n  }\n\n  if (isPromise(value)) {\n    // Use `Promise.resolve()` to wrap promise-like instances.\n    // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n    // change detection.\n    return from(Promise.resolve(value));\n  }\n\n  return of(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalArraysOrString, forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n  return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\n/**\n * A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`\n * for the current router state.\n *\n * @publicApi\n * @see Router.isActive\n */\nexport interface IsActiveMatchOptions {\n  /**\n   * Defines the strategy for comparing the matrix parameters of two `UrlTree`s.\n   *\n   * The matrix parameter matching is dependent on the strategy for matching the\n   * segments. That is, if the `paths` option is set to `'subset'`, only\n   * the matrix parameters of the matching segments will be compared.\n   *\n   * - `'exact'`: Requires that matching segments also have exact matrix parameter\n   * matches.\n   * - `'subset'`: The matching segments in the router's active `UrlTree` may contain\n   * extra matrix parameters, but those that exist in the `UrlTree` in question must match.\n   * - `'ignored'`: When comparing `UrlTree`s, matrix params will be ignored.\n   */\n  matrixParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the query parameters of two `UrlTree`s.\n   *\n   * - `'exact'`: the query parameters must match exactly.\n   * - `'subset'`: the active `UrlTree` may contain extra parameters,\n   * but must match the key and value of any that exist in the `UrlTree` in question.\n   * - `'ignored'`: When comparing `UrlTree`s, query params will be ignored.\n   */\n  queryParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the `UrlSegment`s of the `UrlTree`s.\n   *\n   * - `'exact'`: all segments in each `UrlTree` must match.\n   * - `'subset'`: a `UrlTree` will be determined to be active if it\n   * is a subtree of the active route. That is, the active route may contain extra\n   * segments, but must at least have all the segements of the `UrlTree` in question.\n   */\n  paths: 'exact'|'subset';\n  /**\n   * - 'exact'`: indicates that the `UrlTree` fragments must be equal.\n   * - `'ignored'`: the fragments will not be compared when determining if a\n   * `UrlTree` is active.\n   */\n  fragment: 'exact'|'ignored';\n}\n\ntype ParamMatchOptions = 'exact'|'subset'|'ignored';\n\ntype PathCompareFn =\n    (container: UrlSegmentGroup, containee: UrlSegmentGroup, matrixParams: ParamMatchOptions) =>\n        boolean;\ntype ParamCompareFn = (container: Params, containee: Params) => boolean;\n\nconst pathCompareMap: Record<IsActiveMatchOptions['paths'], PathCompareFn> = {\n  'exact': equalSegmentGroups,\n  'subset': containsSegmentGroup,\n};\nconst paramCompareMap: Record<ParamMatchOptions, ParamCompareFn> = {\n  'exact': equalParams,\n  'subset': containsParams,\n  'ignored': () => true,\n};\n\nexport function containsTree(\n    container: UrlTree, containee: UrlTree, options: IsActiveMatchOptions): boolean {\n  return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) &&\n      paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) &&\n      !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\n\nfunction equalParams(container: Params, containee: Params): boolean {\n  // TODO: This does not handle array params correctly.\n  return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  if (!equalPath(container.segments, containee.segments)) return false;\n  if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n    return false;\n  }\n  if (container.numberOfChildren !== containee.numberOfChildren) return false;\n  for (const c in containee.children) {\n    if (!container.children[c]) return false;\n    if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n      return false;\n  }\n  return true;\n}\n\nfunction containsParams(container: Params, containee: Params): boolean {\n  return Object.keys(containee).length <= Object.keys(container).length &&\n      Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\n\nfunction containsSegmentGroup(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\n\nfunction containsSegmentGroupHelper(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[],\n    matrixParams: ParamMatchOptions): boolean {\n  if (container.segments.length > containeePaths.length) {\n    const current = container.segments.slice(0, containeePaths.length);\n    if (!equalPath(current, containeePaths)) return false;\n    if (containee.hasChildren()) return false;\n    if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n    return true;\n\n  } else if (container.segments.length === containeePaths.length) {\n    if (!equalPath(container.segments, containeePaths)) return false;\n    if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n    for (const c in containee.children) {\n      if (!container.children[c]) return false;\n      if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n        return false;\n      }\n    }\n    return true;\n\n  } else {\n    const current = containeePaths.slice(0, container.segments.length);\n    const next = containeePaths.slice(container.segments.length);\n    if (!equalPath(container.segments, current)) return false;\n    if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n    if (!container.children[PRIMARY_OUTLET]) return false;\n    return containsSegmentGroupHelper(\n        container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n  }\n}\n\nfunction matrixParamsMatch(\n    containerPaths: UrlSegment[], containeePaths: UrlSegment[], options: ParamMatchOptions) {\n  return containeePaths.every((containeeSegment, i) => {\n    return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n  });\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree =\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n *     const f = tree.fragment; // return 'fragment'\n *     const q = tree.queryParams; // returns {debug: 'true'}\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n *     g.children['support'].segments; // return 1 segment 'help'\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The root segment group of the URL tree */\n      public root: UrlSegmentGroup,\n      /** The query params of the URL */\n      public queryParams: Params,\n      /** The fragment of the URL */\n      public fragment: string|null) {}\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return DEFAULT_SERIALIZER.serialize(this);\n  }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n  /** @internal */\n  _sourceSegment?: UrlSegmentGroup;\n  /** @internal */\n  _segmentIndexShift?: number;\n  /** The parent node in the url tree */\n  parent: UrlSegmentGroup|null = null;\n\n  constructor(\n      /** The URL segments of this group. See `UrlSegment` for more information */\n      public segments: UrlSegment[],\n      /** The list of children of this group */\n      public children: {[key: string]: UrlSegmentGroup}) {\n    forEach(children, (v: any, k: any) => v.parent = this);\n  }\n\n  /** Whether the segment has child segments */\n  hasChildren(): boolean {\n    return this.numberOfChildren > 0;\n  }\n\n  /** Number of child segments */\n  get numberOfChildren(): number {\n    return Object.keys(this.children).length;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePaths(this);\n  }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments;\n *     s[0].path; // returns 'team'\n *     s[0].parameters; // returns {id: 33}\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _parameterMap!: ParamMap;\n\n  constructor(\n      /** The path part of a URL segment */\n      public path: string,\n\n      /** The matrix parameters associated with a segment */\n      public parameters: {[name: string]: string}) {}\n\n  get parameterMap() {\n    if (!this._parameterMap) {\n      this._parameterMap = convertToParamMap(this.parameters);\n    }\n    return this._parameterMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePath(this);\n  }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  if (as.length !== bs.length) return false;\n  return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n    segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n  let res: T[] = [];\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet === PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet !== PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n  /** Parse a url into a `UrlTree` */\n  abstract parse(url: string): UrlTree;\n\n  /** Converts a `UrlTree` into a url */\n  abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n  /** Parses a url into a `UrlTree` */\n  parse(url: string): UrlTree {\n    const p = new UrlParser(url);\n    return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n  }\n\n  /** Converts a `UrlTree` into a url */\n  serialize(tree: UrlTree): string {\n    const segment = `/${serializeSegment(tree.root, true)}`;\n    const query = serializeQueryParams(tree.queryParams);\n    const fragment =\n        typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n\n    return `${segment}${query}${fragment}`;\n  }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n  return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n  if (!segment.hasChildren()) {\n    return serializePaths(segment);\n  }\n\n  if (root) {\n    const primary = segment.children[PRIMARY_OUTLET] ?\n        serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n        '';\n    const children: string[] = [];\n\n    forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n      if (k !== PRIMARY_OUTLET) {\n        children.push(`${k}:${serializeSegment(v, false)}`);\n      }\n    });\n\n    return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n  } else {\n    const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n      if (k === PRIMARY_OUTLET) {\n        return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n      }\n\n      return [`${k}:${serializeSegment(v, false)}`];\n    });\n\n    // use no parenthesis if the only child is a primary outlet route\n    if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n      return `${serializePaths(segment)}/${children[0]}`;\n    }\n\n    return `${serializePaths(segment)}/(${children.join('//')})`;\n  }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n  return encodeURIComponent(s)\n      .replace(/%40/g, '@')\n      .replace(/%3A/gi, ':')\n      .replace(/%24/g, '$')\n      .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n  return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n  return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n  return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n  return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n  return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n  return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n  return Object.keys(params)\n      .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n      .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n  const strParams: string[] =\n      Object.keys(params)\n          .map((name) => {\n            const value = params[name];\n            return Array.isArray(value) ?\n                value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n                `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n          })\n          .filter(s => !!s);\n\n  return strParams.length ? `?${strParams.join('&')}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n  const match = str.match(SEGMENT_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n  const match = str.match(QUERY_PARAM_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n  const match = str.match(QUERY_PARAM_VALUE_RE);\n  return match ? match[0] : '';\n}\n\nclass UrlParser {\n  private remaining: string;\n\n  constructor(private url: string) {\n    this.remaining = url;\n  }\n\n  parseRootSegment(): UrlSegmentGroup {\n    this.consumeOptional('/');\n\n    if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n      return new UrlSegmentGroup([], {});\n    }\n\n    // The root segment group never has segments\n    return new UrlSegmentGroup([], this.parseChildren());\n  }\n\n  parseQueryParams(): Params {\n    const params: Params = {};\n    if (this.consumeOptional('?')) {\n      do {\n        this.parseQueryParam(params);\n      } while (this.consumeOptional('&'));\n    }\n    return params;\n  }\n\n  parseFragment(): string|null {\n    return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n  }\n\n  private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n    if (this.remaining === '') {\n      return {};\n    }\n\n    this.consumeOptional('/');\n\n    const segments: UrlSegment[] = [];\n    if (!this.peekStartsWith('(')) {\n      segments.push(this.parseSegment());\n    }\n\n    while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n      this.capture('/');\n      segments.push(this.parseSegment());\n    }\n\n    let children: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('/(')) {\n      this.capture('/');\n      children = this.parseParens(true);\n    }\n\n    let res: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('(')) {\n      res = this.parseParens(false);\n    }\n\n    if (segments.length > 0 || Object.keys(children).length > 0) {\n      res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n    }\n\n    return res;\n  }\n\n  // parse a segment with its matrix parameters\n  // ie `name;k1=v1;k2`\n  private parseSegment(): UrlSegment {\n    const path = matchSegments(this.remaining);\n    if (path === '' && this.peekStartsWith(';')) {\n      throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n    }\n\n    this.capture(path);\n    return new UrlSegment(decode(path), this.parseMatrixParams());\n  }\n\n  private parseMatrixParams(): {[key: string]: string} {\n    const params: {[key: string]: string} = {};\n    while (this.consumeOptional(';')) {\n      this.parseParam(params);\n    }\n    return params;\n  }\n\n  private parseParam(params: {[key: string]: string}): void {\n    const key = matchSegments(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchSegments(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    params[decode(key)] = decode(value);\n  }\n\n  // Parse a single query parameter `name[=value]`\n  private parseQueryParam(params: Params): void {\n    const key = matchQueryParams(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchUrlQueryParamValue(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    const decodedKey = decodeQuery(key);\n    const decodedVal = decodeQuery(value);\n\n    if (params.hasOwnProperty(decodedKey)) {\n      // Append to existing values\n      let currentVal = params[decodedKey];\n      if (!Array.isArray(currentVal)) {\n        currentVal = [currentVal];\n        params[decodedKey] = currentVal;\n      }\n      currentVal.push(decodedVal);\n    } else {\n      // Create a new value\n      params[decodedKey] = decodedVal;\n    }\n  }\n\n  // parse `(a/b//outlet_name:c/d)`\n  private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n    const segments: {[key: string]: UrlSegmentGroup} = {};\n    this.capture('(');\n\n    while (!this.consumeOptional(')') && this.remaining.length > 0) {\n      const path = matchSegments(this.remaining);\n\n      const next = this.remaining[path.length];\n\n      // if is is not one of these characters, then the segment was unescaped\n      // or the group was not closed\n      if (next !== '/' && next !== ')' && next !== ';') {\n        throw new Error(`Cannot parse url '${this.url}'`);\n      }\n\n      let outletName: string = undefined!;\n      if (path.indexOf(':') > -1) {\n        outletName = path.substr(0, path.indexOf(':'));\n        this.capture(outletName);\n        this.capture(':');\n      } else if (allowPrimary) {\n        outletName = PRIMARY_OUTLET;\n      }\n\n      const children = this.parseChildren();\n      segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n                                                                  new UrlSegmentGroup([], children);\n      this.consumeOptional('//');\n    }\n\n    return segments;\n  }\n\n  private peekStartsWith(str: string): boolean {\n    return this.remaining.startsWith(str);\n  }\n\n  // Consumes the prefix when it is present and returns whether it has been consumed\n  private consumeOptional(str: string): boolean {\n    if (this.peekStartsWith(str)) {\n      this.remaining = this.remaining.substring(str.length);\n      return true;\n    }\n    return false;\n  }\n\n  private capture(str: string): void {\n    if (!this.consumeOptional(str)) {\n      throw new Error(`Expected \"${str}\".`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n  /** @internal */\n  _root: TreeNode<T>;\n\n  constructor(root: TreeNode<T>) {\n    this._root = root;\n  }\n\n  get root(): T {\n    return this._root.value;\n  }\n\n  /**\n   * @internal\n   */\n  parent(t: T): T|null {\n    const p = this.pathFromRoot(t);\n    return p.length > 1 ? p[p.length - 2] : null;\n  }\n\n  /**\n   * @internal\n   */\n  children(t: T): T[] {\n    const n = findNode(t, this._root);\n    return n ? n.children.map(t => t.value) : [];\n  }\n\n  /**\n   * @internal\n   */\n  firstChild(t: T): T|null {\n    const n = findNode(t, this._root);\n    return n && n.children.length > 0 ? n.children[0].value : null;\n  }\n\n  /**\n   * @internal\n   */\n  siblings(t: T): T[] {\n    const p = findPath(t, this._root);\n    if (p.length < 2) return [];\n\n    const c = p[p.length - 2].children.map(c => c.value);\n    return c.filter(cc => cc !== t);\n  }\n\n  /**\n   * @internal\n   */\n  pathFromRoot(t: T): T[] {\n    return findPath(t, this._root).map(s => s.value);\n  }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n  if (value === node.value) return node;\n\n  for (const child of node.children) {\n    const node = findNode(value, child);\n    if (node) return node;\n  }\n\n  return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n  if (value === node.value) return [node];\n\n  for (const child of node.children) {\n    const path = findPath(value, child);\n    if (path.length) {\n      path.unshift(node);\n      return path;\n    }\n  }\n\n  return [];\n}\n\nexport class TreeNode<T> {\n  constructor(public value: T, public children: TreeNode<T>[]) {}\n\n  toString(): string {\n    return `TreeNode(${this.value})`;\n  }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends {outlet: string}>(node: TreeNode<T>|null) {\n  const map: {[outlet: string]: TreeNode<T>} = {};\n\n  if (node) {\n    node.children.forEach(child => map[child.value.outlet] = child);\n  }\n\n  return map;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalSegments, UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const root: ActivatedRoute = state.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n  /** @internal */\n  constructor(\n      root: TreeNode<ActivatedRoute>,\n      /** The current snapshot of the router state */\n      public snapshot: RouterStateSnapshot) {\n    super(root);\n    setRouterState(<RouterState>this, root);\n  }\n\n  override toString(): string {\n    return this.snapshot.toString();\n  }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>|null): RouterState {\n  const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n  const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n  const emptyParams = new BehaviorSubject({});\n  const emptyData = new BehaviorSubject({});\n  const emptyQueryParams = new BehaviorSubject({});\n  const fragment = new BehaviorSubject('');\n  const activated = new ActivatedRoute(\n      emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n      snapshot.root);\n  activated.snapshot = snapshot.root;\n  return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n    urlTree: UrlTree, rootComponent: Type<any>|null): RouterStateSnapshot {\n  const emptyParams = {};\n  const emptyData = {};\n  const emptyQueryParams = {};\n  const fragment = '';\n  const activated = new ActivatedRouteSnapshot(\n      [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n      urlTree.root, -1, {});\n  return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n *     header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n  /** The current snapshot of this route */\n  snapshot!: ActivatedRouteSnapshot;\n  /** @internal */\n  _futureSnapshot: ActivatedRouteSnapshot;\n  /** @internal */\n  _routerState!: RouterState;\n  /** @internal */\n  _paramMap!: Observable<ParamMap>;\n  /** @internal */\n  _queryParamMap!: Observable<ParamMap>;\n\n  /** @internal */\n  constructor(\n      /** An observable of the URL segments matched by this route. */\n      public url: Observable<UrlSegment[]>,\n      /** An observable of the matrix parameters scoped to this route. */\n      public params: Observable<Params>,\n      /** An observable of the query parameters shared by all the routes. */\n      public queryParams: Observable<Params>,\n      /** An observable of the URL fragment shared by all the routes. */\n      public fragment: Observable<string|null>,\n      /** An observable of the static and resolved data of this route. */\n      public data: Observable<Data>,\n      /** The outlet name of the route, a constant. */\n      public outlet: string,\n      /** The component of the route, a constant. */\n      // TODO(vsavkin): remove |string\n      public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n    this._futureSnapshot = futureSnapshot;\n  }\n\n  /** The configuration used to match this route. */\n  get routeConfig(): Route|null {\n    return this._futureSnapshot.routeConfig;\n  }\n\n  /** The root of the router state. */\n  get root(): ActivatedRoute {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree. */\n  get parent(): ActivatedRoute|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree. */\n  get firstChild(): ActivatedRoute|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree. */\n  get children(): ActivatedRoute[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route. */\n  get pathFromRoot(): ActivatedRoute[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  /**\n   * An Observable that contains a map of the required and optional parameters\n   * specific to the route.\n   * The map supports retrieving single and multiple values from the same parameter.\n   */\n  get paramMap(): Observable<ParamMap> {\n    if (!this._paramMap) {\n      this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._paramMap;\n  }\n\n  /**\n   * An Observable that contains a map of the query parameters available to all routes.\n   * The map supports retrieving single and multiple values from the query parameter.\n   */\n  get queryParamMap(): Observable<ParamMap> {\n    if (!this._queryParamMap) {\n      this._queryParamMap =\n          this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n  }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly'|'always';\n\n/** @internal */\nexport type Inherited = {\n  params: Params,\n  data: Data,\n  resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n    route: ActivatedRouteSnapshot,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n  const pathFromRoot = route.pathFromRoot;\n\n  let inheritingStartingFrom = 0;\n  if (paramsInheritanceStrategy !== 'always') {\n    inheritingStartingFrom = pathFromRoot.length - 1;\n\n    while (inheritingStartingFrom >= 1) {\n      const current = pathFromRoot[inheritingStartingFrom];\n      const parent = pathFromRoot[inheritingStartingFrom - 1];\n      // current route is an empty path => inherits its parent's params and data\n      if (current.routeConfig && current.routeConfig.path === '') {\n        inheritingStartingFrom--;\n\n        // parent is componentless => current route should inherit its params and data\n      } else if (!parent.component) {\n        inheritingStartingFrom--;\n\n      } else {\n        break;\n      }\n    }\n  }\n\n  return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n  return pathFromRoot.reduce((res, curr) => {\n    const params = {...res.params, ...curr.params};\n    const data = {...res.data, ...curr.data};\n    const resolve = {...res.resolve, ...curr._resolvedData};\n    return {params, data, resolve};\n  }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n *   constructor(route: ActivatedRoute) {\n *     const id: string = route.snapshot.params.id;\n *     const url: string = route.snapshot.url.join('');\n *     const user = route.snapshot.data.user;\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n  /** The configuration used to match this route **/\n  public readonly routeConfig: Route|null;\n  /** @internal **/\n  _urlSegment: UrlSegmentGroup;\n  /** @internal */\n  _lastPathIndex: number;\n  /** @internal */\n  _resolve: ResolveData;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _resolvedData!: Data;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _routerState!: RouterStateSnapshot;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _paramMap!: ParamMap;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The URL segments matched by this route */\n      public url: UrlSegment[],\n      /**\n       *  The matrix parameters scoped to this route.\n       *\n       *  You can compute all params (or data) in the router state or to get params outside\n       *  of an activated component by traversing the `RouterState` tree as in the following\n       *  example:\n       *  ```\n       *  collectRouteParams(router: Router) {\n       *    let params = {};\n       *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n       *    while (stack.length > 0) {\n       *      const route = stack.pop()!;\n       *      params = {...params, ...route.params};\n       *      stack.push(...route.children);\n       *    }\n       *    return params;\n       *  }\n       *  ```\n       */\n      public params: Params,\n      /** The query parameters shared by all the routes */\n      public queryParams: Params,\n      /** The URL fragment shared by all the routes */\n      public fragment: string|null,\n      /** The static and resolved data of this route */\n      public data: Data,\n      /** The outlet name of the route */\n      public outlet: string,\n      /** The component of the route */\n      public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n      lastPathIndex: number, resolve: ResolveData) {\n    this.routeConfig = routeConfig;\n    this._urlSegment = urlSegment;\n    this._lastPathIndex = lastPathIndex;\n    this._resolve = resolve;\n  }\n\n  /** The root of the router state */\n  get root(): ActivatedRouteSnapshot {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree */\n  get parent(): ActivatedRouteSnapshot|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree */\n  get firstChild(): ActivatedRouteSnapshot|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree */\n  get children(): ActivatedRouteSnapshot[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route */\n  get pathFromRoot(): ActivatedRouteSnapshot[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  get paramMap(): ParamMap {\n    if (!this._paramMap) {\n      this._paramMap = convertToParamMap(this.params);\n    }\n    return this._paramMap;\n  }\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    const url = this.url.map(segment => segment.toString()).join('/');\n    const matched = this.routeConfig ? this.routeConfig.path : '';\n    return `Route(url:'${url}', path:'${matched}')`;\n  }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const snapshot: RouterStateSnapshot = state.snapshot;\n *     const root: ActivatedRouteSnapshot = snapshot.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n  /** @internal */\n  constructor(\n      /** The url from which this snapshot was created */\n      public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n    super(root);\n    setRouterState(<RouterStateSnapshot>this, root);\n  }\n\n  override toString(): string {\n    return serializeNode(this._root);\n  }\n}\n\nfunction setRouterState<U, T extends {_routerState: U}>(state: U, node: TreeNode<T>): void {\n  node.value._routerState = state;\n  node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n  const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n  return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n  if (route.snapshot) {\n    const currentSnapshot = route.snapshot;\n    const nextSnapshot = route._futureSnapshot;\n    route.snapshot = nextSnapshot;\n    if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n      (<any>route.queryParams).next(nextSnapshot.queryParams);\n    }\n    if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n      (<any>route.fragment).next(nextSnapshot.fragment);\n    }\n    if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n      (<any>route.params).next(nextSnapshot.params);\n    }\n    if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n      (<any>route.url).next(nextSnapshot.url);\n    }\n    if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n      (<any>route.data).next(nextSnapshot.data);\n    }\n  } else {\n    route.snapshot = route._futureSnapshot;\n\n    // this is for resolved data\n    (<any>route.data).next(route._futureSnapshot.data);\n  }\n}\n\n\nexport function equalParamsAndUrlSegments(\n    a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n  const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n  const parentsMismatch = !a.parent !== !b.parent;\n\n  return equalUrlParams && !parentsMismatch &&\n      (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent!));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n    routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n    prevState: RouterState): RouterState {\n  const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n  return new RouterState(root, curr);\n}\n\nfunction createNode(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n  // reuse an activated route that is currently displayed on the screen\n  if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n    const value = prevState.value;\n    value._futureSnapshot = curr.value;\n    const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n    return new TreeNode<ActivatedRoute>(value, children);\n  } else {\n    if (routeReuseStrategy.shouldAttach(curr.value)) {\n      // retrieve an activated route that is used to be displayed, but is not currently displayed\n      const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n      if (detachedRouteHandle !== null) {\n        const tree = (detachedRouteHandle as DetachedRouteHandleInternal).route;\n        setFutureSnapshotsOfActivatedRoutes(curr, tree);\n        return tree;\n      }\n    }\n\n    const value = createActivatedRoute(curr.value);\n    const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n    return new TreeNode<ActivatedRoute>(value, children);\n  }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n    curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n  if (curr.value.routeConfig !== result.value.routeConfig) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n  }\n  if (curr.children.length !== result.children.length) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n  }\n  result.value._futureSnapshot = curr.value;\n  for (let i = 0; i < curr.children.length; ++i) {\n    setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n  }\n}\n\nfunction createOrReuseChildren(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState: TreeNode<ActivatedRoute>) {\n  return curr.children.map(child => {\n    for (const p of prevState.children) {\n      if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n        return createNode(routeReuseStrategy, child, p);\n      }\n    }\n    return createNode(routeReuseStrategy, child);\n  });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n  return new ActivatedRoute(\n      new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n      new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n    route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params|null,\n    fragment: string|null): UrlTree {\n  if (commands.length === 0) {\n    return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n  }\n\n  const nav = computeNavigation(commands);\n\n  if (nav.toRoot()) {\n    return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n  }\n\n  const startingPosition = findStartingPosition(nav, urlTree, route);\n\n  const segmentGroup = startingPosition.processChildren ?\n      updateSegmentGroupChildren(\n          startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n      updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n  return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n  return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command: any): command is {outlets: {[key: string]: any}} {\n  return typeof command === 'object' && command != null && command.outlets;\n}\n\nfunction tree(\n    oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n    queryParams: Params|null, fragment: string|null): UrlTree {\n  let qp: any = {};\n  if (queryParams) {\n    forEach(queryParams, (value: any, name: any) => {\n      qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n    });\n  }\n\n  if (urlTree.root === oldSegmentGroup) {\n    return new UrlTree(newSegmentGroup, qp, fragment);\n  }\n\n  return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n    current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n    newSegment: UrlSegmentGroup): UrlSegmentGroup {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n    if (c === oldSegment) {\n      children[outletName] = newSegment;\n    } else {\n      children[outletName] = replaceSegment(c, oldSegment, newSegment);\n    }\n  });\n  return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n  constructor(\n      public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n    if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n      throw new Error('Root segment cannot have matrix parameters');\n    }\n\n    const cmdWithOutlet = commands.find(isCommandWithOutlets);\n    if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n      throw new Error('{outlets:{}} has to be the last command');\n    }\n  }\n\n  public toRoot(): boolean {\n    return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n  }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n  if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n    return new Navigation(true, 0, commands);\n  }\n\n  let numberOfDoubleDots = 0;\n  let isAbsolute = false;\n\n  const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n    if (typeof cmd === 'object' && cmd != null) {\n      if (cmd.outlets) {\n        const outlets: {[k: string]: any} = {};\n        forEach(cmd.outlets, (commands: any, name: string) => {\n          outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n        });\n        return [...res, {outlets}];\n      }\n\n      if (cmd.segmentPath) {\n        return [...res, cmd.segmentPath];\n      }\n    }\n\n    if (!(typeof cmd === 'string')) {\n      return [...res, cmd];\n    }\n\n    if (cmdIdx === 0) {\n      cmd.split('/').forEach((urlPart, partIndex) => {\n        if (partIndex == 0 && urlPart === '.') {\n          // skip './a'\n        } else if (partIndex == 0 && urlPart === '') {  //  '/a'\n          isAbsolute = true;\n        } else if (urlPart === '..') {  //  '../a'\n          numberOfDoubleDots++;\n        } else if (urlPart != '') {\n          res.push(urlPart);\n        }\n      });\n\n      return res;\n    }\n\n    return [...res, cmd];\n  }, []);\n\n  return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n  constructor(\n      public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n  }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n  if (nav.isAbsolute) {\n    return new Position(tree.root, true, 0);\n  }\n\n  if (route.snapshot._lastPathIndex === -1) {\n    const segmentGroup = route.snapshot._urlSegment;\n    // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n    // see issue #26224, #13011, #35687\n    // However, if the ActivatedRoute is the root we should process children like above.\n    const processChildren = segmentGroup === tree.root;\n    return new Position(segmentGroup, processChildren, 0);\n  }\n\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = route.snapshot._lastPathIndex + modifier;\n  return createPositionApplyingDoubleDots(\n      route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n    group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n  let g = group;\n  let ci = index;\n  let dd = numberOfDoubleDots;\n  while (dd > ci) {\n    dd -= ci;\n    g = g.parent!;\n    if (!g) {\n      throw new Error('Invalid number of \\'../\\'');\n    }\n    ci = g.segments.length;\n  }\n  return new Position(g, false, ci - dd);\n}\n\nfunction getOutlets(commands: unknown[]): {[k: string]: unknown[]|string} {\n  if (isCommandWithOutlets(commands[0])) {\n    return commands[0].outlets;\n  }\n\n  return {[PRIMARY_OUTLET]: commands};\n}\n\nfunction updateSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (!segmentGroup) {\n    segmentGroup = new UrlSegmentGroup([], {});\n  }\n  if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n    return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n  }\n\n  const m = prefixedWith(segmentGroup, startIndex, commands);\n  const slicedCommands = commands.slice(m.commandIndex);\n  if (m.match && m.pathIndex < segmentGroup.segments.length) {\n    const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n    g.children[PRIMARY_OUTLET] =\n        new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n    return updateSegmentGroupChildren(g, 0, slicedCommands);\n  } else if (m.match && slicedCommands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else if (m.match && !segmentGroup.hasChildren()) {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  } else if (m.match) {\n    return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n  } else {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  }\n}\n\nfunction updateSegmentGroupChildren(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (commands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else {\n    const outlets = getOutlets(commands);\n    const children: {[key: string]: UrlSegmentGroup} = {};\n\n    forEach(outlets, (commands, outlet) => {\n      if (typeof commands === 'string') {\n        commands = [commands];\n      }\n      if (commands !== null) {\n        children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n      }\n    });\n\n    forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n      if (outlets[childOutlet] === undefined) {\n        children[childOutlet] = child;\n      }\n    });\n    return new UrlSegmentGroup(segmentGroup.segments, children);\n  }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n  let currentCommandIndex = 0;\n  let currentPathIndex = startIndex;\n\n  const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n  while (currentPathIndex < segmentGroup.segments.length) {\n    if (currentCommandIndex >= commands.length) return noMatch;\n    const path = segmentGroup.segments[currentPathIndex];\n    const command = commands[currentCommandIndex];\n    // Do not try to consume command as part of the prefixing if it has outlets because it can\n    // contain outlets other than the one being processed. Consuming the outlets command would\n    // result in other outlets being ignored.\n    if (isCommandWithOutlets(command)) {\n      break;\n    }\n    const curr = `${command}`;\n    const next =\n        currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n    if (currentPathIndex > 0 && curr === undefined) break;\n\n    if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n      if (!compare(curr, next, path)) return noMatch;\n      currentCommandIndex += 2;\n    } else {\n      if (!compare(curr, {}, path)) return noMatch;\n      currentCommandIndex++;\n    }\n    currentPathIndex++;\n  }\n\n  return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  const paths = segmentGroup.segments.slice(0, startIndex);\n\n  let i = 0;\n  while (i < commands.length) {\n    const command = commands[i];\n    if (isCommandWithOutlets(command)) {\n      const children = createNewSegmentChildren(command.outlets);\n      return new UrlSegmentGroup(paths, children);\n    }\n\n    // if we start with an object literal, we need to reuse the path part from the segment\n    if (i === 0 && isMatrixParams(commands[0])) {\n      const p = segmentGroup.segments[startIndex];\n      paths.push(new UrlSegment(p.path, stringify(commands[0])));\n      i++;\n      continue;\n    }\n\n    const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n    const next = (i < commands.length - 1) ? commands[i + 1] : null;\n    if (curr && next && isMatrixParams(next)) {\n      paths.push(new UrlSegment(curr, stringify(next)));\n      i += 2;\n    } else {\n      paths.push(new UrlSegment(curr, {}));\n      i++;\n    }\n  }\n  return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: unknown[]|string}):\n    {[outlet: string]: UrlSegmentGroup} {\n  const children: {[outlet: string]: UrlSegmentGroup} = {};\n  forEach(outlets, (commands, outlet) => {\n    if (typeof commands === 'string') {\n      commands = [commands];\n    }\n    if (commands !== null) {\n      children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n    }\n  });\n  return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n  const res: {[key: string]: string} = {};\n  forEach(params, (v: any, k: string) => res[k] = `${v}`);\n  return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n  return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, advanceActivatedRoute, RouterState} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport const activateRoutes =\n    (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n     forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n        map(t => {\n          new ActivateRoutes(\n              routeReuseStrategy, t.targetRouterState!, t.currentRouterState, forwardEvent)\n              .activate(rootContexts);\n          return t;\n        });\n\nexport class ActivateRoutes {\n  constructor(\n      private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n      private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n  activate(parentContexts: ChildrenOutletContexts): void {\n    const futureRoot = this.futureState._root;\n    const currRoot = this.currState ? this.currState._root : null;\n\n    this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n    advanceActivatedRoute(this.futureState.root);\n    this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n  }\n\n  // De-activate the child route that are not re-used for the future state\n  private deactivateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n    // Recurse on the routes active in the future state to de-activate deeper children\n    futureNode.children.forEach(futureChild => {\n      const childOutletName = futureChild.value.outlet;\n      this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n      delete children[childOutletName];\n    });\n\n    // De-activate the routes that will not be re-used\n    forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n      this.deactivateRouteAndItsChildren(v, contexts);\n    });\n  }\n\n  private deactivateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContext: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    if (future === curr) {\n      // Reusing the node, check to see if the children need to be de-activated\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContext.getContext(future.outlet);\n        if (context) {\n          this.deactivateChildRoutes(futureNode, currNode, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.deactivateChildRoutes(futureNode, currNode, parentContext);\n      }\n    } else {\n      if (curr) {\n        // Deactivate the current route which will not be re-used\n        this.deactivateRouteAndItsChildren(currNode, parentContext);\n      }\n    }\n  }\n\n  private deactivateRouteAndItsChildren(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n      this.detachAndStoreRouteSubtree(route, parentContexts);\n    } else {\n      this.deactivateRouteAndOutlet(route, parentContexts);\n    }\n  }\n\n  private detachAndStoreRouteSubtree(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    if (context && context.outlet) {\n      const componentRef = context.outlet.detach();\n      const contexts = context.children.onOutletDeactivated();\n      this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n    }\n  }\n\n  private deactivateRouteAndOutlet(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    // The context could be `null` if we are on a componentless route but there may still be\n    // children that need deactivating.\n    const contexts = context && route.value.component ? context.children : parentContexts;\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);\n\n    for (const childOutlet of Object.keys(children)) {\n      this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n    }\n\n    if (context && context.outlet) {\n      // Destroy the component\n      context.outlet.deactivate();\n      // Destroy the contexts for all the outlets that were in the component\n      context.children.onOutletDeactivated();\n      // Clear the information about the attached component on the context but keep the reference to\n      // the outlet.\n      context.attachRef = null;\n      context.resolver = null;\n      context.route = null;\n    }\n  }\n\n  private activateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outlet: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n    futureNode.children.forEach(c => {\n      this.activateRoutes(c, children[c.value.outlet], contexts);\n      this.forwardEvent(new ActivationEnd(c.value.snapshot));\n    });\n    if (futureNode.children.length) {\n      this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n    }\n  }\n\n  private activateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContexts: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    advanceActivatedRoute(future);\n\n    // reusing the node\n    if (future === curr) {\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n        this.activateChildRoutes(futureNode, currNode, context.children);\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, currNode, parentContexts);\n      }\n    } else {\n      if (future.component) {\n        // if we have a normal route, we need to place the component into the outlet and recurse.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n\n        if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n          const stored =\n              (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n          this.routeReuseStrategy.store(future.snapshot, null);\n          context.children.onOutletReAttached(stored.contexts);\n          context.attachRef = stored.componentRef;\n          context.route = stored.route.value;\n          if (context.outlet) {\n            // Attach right away when the outlet has already been instantiated\n            // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n            context.outlet.attach(stored.componentRef, stored.route.value);\n          }\n          advanceActivatedRouteNodeAndItsChildren(stored.route);\n        } else {\n          const config = parentLoadedConfig(future.snapshot);\n          const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n          context.attachRef = null;\n          context.route = future;\n          context.resolver = cmpFactoryResolver;\n          if (context.outlet) {\n            // Activate the outlet when it has already been instantiated\n            // Otherwise it will get activated from its `ngOnInit` when instantiated\n            context.outlet.activateWith(future, cmpFactoryResolver);\n          }\n\n          this.activateChildRoutes(futureNode, null, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, null, parentContexts);\n      }\n    }\n  }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n  advanceActivatedRoute(node.value);\n  node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n    if (route && route.component) return null;\n  }\n\n  return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * Represents a route configuration for the Router service.\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\n * in `Route.children`.\n *\n * @see `Route`\n * @see `Router`\n * @see [Router configuration guide](guide/router-reference#configuration)\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * Represents the result of matching URLs with a custom matching function.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @see `UrlMatcher()`\n * @publicApi\n */\nexport type UrlMatchResult = {\n  consumed: UrlSegment[];\n  posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * A function for matching a route against URLs. Implement a custom URL matcher\n * for `Route.matcher` when a combination of `path` and `pathMatch`\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\n *\n * The function takes the following arguments and returns a `UrlMatchResult` object.\n * * *segments* : An array of URL segments.\n * * *group* : A segment group.\n * * *route* : The route to match against.\n *\n * The following example implementation matches HTML files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n    UrlMatchResult|null;\n\n/**\n *\n * Represents static data associated with a particular route.\n *\n * @see `Route#data`\n *\n * @publicApi\n */\nexport type Data = {\n  [name: string]: any\n};\n\n/**\n *\n * Represents the resolved data associated with a particular route.\n *\n * @see `Route#resolve`.\n *\n * @publicApi\n */\nexport type ResolveData = {\n  [name: string]: any\n};\n\n/**\n *\n * A function that is called to resolve a collection of lazy-loaded routes.\n * Must be an arrow function of the following form:\n * `() => import('...').then(mod => mod.MODULE)`\n *\n * For example:\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @see [Route.loadChildren](api/router/Route#loadChildren)\n * @publicApi\n */\nexport type LoadChildrenCallback = () => Type<any>|NgModuleFactory<any>|Observable<Type<any>>|\n    Promise<NgModuleFactory<any>|Type<any>|any>;\n\n/**\n *\n * A function that returns a set of routes to load.\n *\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\n * form (`LoadChildrenCallback`) should be used instead.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n */\nexport type LoadChildren = LoadChildrenCallback|DeprecatedLoadChildren;\n\n/**\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n * @deprecated The `string` form of `loadChildren` is deprecated in favor of the\n * `LoadChildrenCallback` function which uses the ES dynamic `import()` expression.\n * This offers a more natural and standards-based mechanism to dynamically\n * load an ES module at runtime.\n */\nexport type DeprecatedLoadChildren = string;\n\n/**\n *\n * How to handle query parameters in a router link.\n * One of:\n * - `merge` : Merge new with current parameters.\n * - `preserve` : Preserve current parameters.\n *\n * @see `UrlCreationOptions#queryParamsHandling`\n * @see `RouterLink`\n * @publicApi\n */\nexport type QueryParamsHandling = 'merge'|'preserve'|'';\n\n/**\n *\n * A policy for when to run guards and resolvers on a route.\n *\n * @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)\n * @publicApi\n */\nexport type RunGuardsAndResolvers =\n    'pathParamsChange'|'pathParamsOrQueryParamsChange'|'paramsChange'|'paramsOrQueryParamsChange'|\n    'always'|((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * A configuration object that defines a single route.\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\n * The router attempts to match segments of a given URL against each route,\n * using the configuration options defined in this object.\n *\n * Supports static, parameterized, redirect, and wildcard routes, as well as\n * custom route data and resolve methods.\n *\n * For detailed usage information, see the [Routing Guide](guide/router).\n *\n * @usageNotes\n *\n * ### Simple Configuration\n *\n * The following route specifies that when navigating to, for example,\n * `/team/11/user/bob`, the router creates the 'Team' component\n * with the 'User' child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n  *  component: Team,\n *   children: [{\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * ### Multiple Outlets\n *\n * The following route creates sibling components with multiple outlets.\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team\n * }, {\n *   path: 'chat/:user',\n *   component: Chat\n *   outlet: 'aux'\n * }]\n * ```\n *\n * ### Wild Cards\n *\n * The following route uses wild-card notation to specify a component\n * that is always instantiated regardless of where you navigate to.\n *\n * ```\n * [{\n *   path: '**',\n *   component: WildcardComponent\n * }]\n * ```\n *\n * ### Redirects\n *\n * The following route uses the `redirectTo` property to ignore a segment of\n * a given URL when looking for a child path.\n *\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\n * the Team component with the User child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: 'legacy/user/:name',\n *     redirectTo: 'user/:name'\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * The redirect path can be relative, as shown in this example, or absolute.\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\n * the result URL is also absolute, '/user/jim'.\n\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any URL segments.\n *\n * In the following configuration, when navigating to\n * `/team/11`, the router instantiates the 'AllUsers' component.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: AllUsers\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * Empty-path routes can have children. In the following example, when navigating\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\n * the user component in it.\n *\n * Note that an empty path route inherits its parent's parameters and data.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: WrapperCmp,\n *     children: [{\n *       path: 'user/:name',\n *       component: User\n *     }]\n *   }]\n * }]\n * ```\n *\n * ### Matching Strategy\n *\n * The default path-match strategy is 'prefix', which means that the router\n * checks URL elements from the left to see if the URL matches a specified path.\n * For example, '/team/11/user' matches 'team/:id'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'prefix', //default\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * You can specify the path-match strategy 'full' to make sure that the path\n * covers the whole unconsumed URL. It is important to do this when redirecting\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating to the redirect destination,\n * creating an endless loop.\n *\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\n * that the router applies the redirect if and only if navigating to '/'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'full',\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * You can share parameters between sibling components.\n * For example, suppose that two sibling components should go next to each other,\n * and both of them require an ID parameter. You can accomplish this using a route\n * that does not specify a component at the top level.\n *\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\n * the main child and aux child components next to each other.\n * For this to work, the application component must have the primary and aux outlets defined.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: 'a', component: MainChild },\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * The router merges the parameters, data, and resolve of the componentless\n * parent into the parameters, data, and resolve of the children.\n *\n * This is especially useful when child components are defined\n * with an empty path string, as in the following example.\n * With this configuration, navigating to '/parent/10' creates\n * the main child and aux components.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: '', component: MainChild },\n *      { path: '', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up application load time by splitting the application\n * into multiple bundles and loading them on demand.\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\n * instead of the `children` property.\n *\n * Given the following example route, the router will lazy load\n * the associated module on demand using the browser native import system.\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @publicApi\n */\nexport interface Route {\n  /**\n   * The path to match against. Cannot be used together with a custom `matcher` function.\n   * A URL string that uses router matching notation.\n   * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\n   * Default is \"/\" (the root path).\n   *\n   */\n  path?: string;\n  /**\n   * The path-matching strategy, one of 'prefix' or 'full'.\n   * Default is 'prefix'.\n   *\n   * By default, the router checks URL elements from the left to see if the URL\n   * matches a given path and stops when there is a config match. Importantly there must still be a\n   * config match for each segment of the URL. For example, '/team/11/user' matches the prefix\n   * 'team/:id' if one of the route's children matches the segment 'user'. That is, the URL\n   * '/team/11/user` matches the config\n   * `{path: 'team/:id', children: [{path: ':user', component: User}]}`\n   * but does not match when there are no children as in `{path: 'team/:id', component: Team}`.\n   *\n   * The path-match strategy 'full' matches against the entire URL.\n   * It is important to do this when redirecting empty-path routes.\n   * Otherwise, because an empty path is a prefix of any URL,\n   * the router would apply the redirect even when navigating\n   * to the redirect destination, creating an endless loop.\n   *\n   */\n  pathMatch?: string;\n  /**\n   * A custom URL-matching function. Cannot be used together with `path`.\n   */\n  matcher?: UrlMatcher;\n  /**\n   * The component to instantiate when the path matches.\n   * Can be empty if child routes specify components.\n   */\n  component?: Type<any>;\n  /**\n   * A URL to redirect to when the path matches.\n   *\n   * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\n   * Note that no further redirects are evaluated after an absolute redirect.\n   *\n   * When not present, router does not redirect.\n   */\n  redirectTo?: string;\n  /**\n   * Name of a `RouterOutlet` object where the component can be placed\n   * when the path matches.\n   */\n  outlet?: string;\n  /**\n   * An array of dependency-injection tokens used to look up `CanActivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * activate the component. By default, any user can activate.\n   */\n  canActivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanActivateChild()` handlers,\n   * in order to determine if the current user is allowed to activate\n   * a child of the component. By default, any user can activate a child.\n   */\n  canActivateChild?: any[];\n  /**\n   * An array of DI tokens used to look up `CanDeactivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * deactivate the component. By default, any user can deactivate.\n   *\n   */\n  canDeactivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanLoad()`\n   * handlers, in order to determine if the current user is allowed to\n   * load the component. By default, any user can load.\n   */\n  canLoad?: any[];\n  /**\n   * Additional developer-defined data provided to the component via\n   * `ActivatedRoute`. By default, no additional data is passed.\n   */\n  data?: Data;\n  /**\n   * A map of DI tokens used to look up data resolvers. See `Resolve`.\n   */\n  resolve?: ResolveData;\n  /**\n   * An array of child `Route` objects that specifies a nested route\n   * configuration.\n   */\n  children?: Routes;\n  /**\n   * An object specifying lazy-loaded child routes.\n   */\n  loadChildren?: LoadChildren;\n  /**\n   * Defines when guards and resolvers will be run. One of\n   * - `paramsOrQueryParamsChange` : Run when query parameters change.\n   * - `always` : Run on every execution.\n   * By default, guards and resolvers run only when the matrix\n   * parameters of the route change.\n   */\n  runGuardsAndResolvers?: RunGuardsAndResolvers;\n  /**\n   * Filled for routes with `loadChildren` once the module has been loaded\n   * @internal\n   */\n  _loadedConfig?: LoadedRouterConfig;\n  /**\n   * Filled for routes with `loadChildren` during load\n   * @internal\n   */\n  _loader$?: Observable<LoadedRouterConfig>;\n}\n\nexport class LoadedRouterConfig {\n  constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n *   return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n *   return fn(1, 2);\n * } else {\n *   throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n  return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n  return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n  return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n  return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n  return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n  return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n  return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {combineLatest, Observable, OperatorFunction} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n    OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n  return switchMap(obs => {\n    return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n               .pipe(\n                   scan(\n                       (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n                         let isPending = false;\n                         return list.reduce((innerAcc, val, i: number) => {\n                           if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n                           // Toggle pending flag if any values haven't been set yet\n                           if (val === INITIAL_VALUE) isPending = true;\n\n                           // Any other return values are only valid if we haven't yet hit a pending\n                           // call. This guarantees that in the case of a guard at the bottom of the\n                           // tree that returns a redirect, we will wait for the higher priority\n                           // guard at the top to finish before performing the redirect.\n                           if (!isPending) {\n                             // Early return when we hit a `false` value as that should always\n                             // cancel navigation\n                             if (val === false) return val;\n\n                             if (i === list.length - 1 || isUrlTree(val)) {\n                               return val;\n                             }\n                           }\n\n                           return innerAcc;\n                         }, acc);\n                       },\n                       INITIAL_VALUE),\n                   filter(item => item !== INITIAL_VALUE),\n                   map(item => isUrlTree(item) ? item : item === true),  //\n                   take(1)) as Observable<boolean|UrlTree>;\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class ɵEmptyOutletComponent {\n}\n\nexport {ɵEmptyOutletComponent as EmptyOutletComponent};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EmptyOutletComponent} from '../components/empty_outlet';\nimport {Route, Routes} from '../config';\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n  // forEach doesn't iterate undefined values\n  for (let i = 0; i < config.length; i++) {\n    const route: Route = config[i];\n    const fullPath: string = getFullPath(parentPath, route);\n    validateNode(route, fullPath);\n  }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (!route) {\n      throw new Error(`\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n    }\n    if (Array.isArray(route)) {\n      throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n    }\n    if (!route.component && !route.children && !route.loadChildren &&\n        (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n    }\n    if (route.redirectTo && route.children) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and children cannot be used together`);\n    }\n    if (route.redirectTo && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and loadChildren cannot be used together`);\n    }\n    if (route.children && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': children and loadChildren cannot be used together`);\n    }\n    if (route.redirectTo && route.component) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and component cannot be used together`);\n    }\n    if (route.redirectTo && route.canActivate) {\n      throw new Error(\n          `Invalid configuration of route '${\n              fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n          `so canActivate will never be executed.`);\n    }\n    if (route.path && route.matcher) {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n    }\n    if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n    }\n    if (route.path === void 0 && route.matcher === void 0) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': routes must have either a path or a matcher specified`);\n    }\n    if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n    }\n    if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n      const exp =\n          `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n      throw new Error(`Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${\n          route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n    }\n    if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n    }\n  }\n  if (route.children) {\n    validateConfig(route.children, fullPath);\n  }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n  if (!currentRoute) {\n    return parentPath;\n  }\n  if (!parentPath && !currentRoute.path) {\n    return '';\n  } else if (parentPath && !currentRoute.path) {\n    return `${parentPath}/`;\n  } else if (!parentPath && currentRoute.path) {\n    return currentRoute.path;\n  } else {\n    return `${parentPath}/${currentRoute.path}`;\n  }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n  const children = r.children && r.children.map(standardizeConfig);\n  const c = children ? {...r, children} : {...r};\n  if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n    c.component = EmptyOutletComponent;\n  }\n  return c;\n}\n\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nexport function getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\n\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nexport function sortByMatchingOutlets(routes: Routes, outletName: string): Routes {\n  const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n  sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n  return sortedConfig;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from '../config';\nimport {defaultUrlMatcher, PRIMARY_OUTLET} from '../shared';\nimport {UrlSegment, UrlSegmentGroup} from '../url_tree';\n\nimport {forEach} from './collection';\nimport {getOutlet} from './config';\n\nexport interface MatchResult {\n  matched: boolean;\n  consumedSegments: UrlSegment[];\n  lastChild: number;\n  parameters: {[k: string]: string};\n  positionalParamSegments: {[k: string]: UrlSegment};\n}\n\nconst noMatch: MatchResult = {\n  matched: false,\n  consumedSegments: [],\n  lastChild: 0,\n  parameters: {},\n  positionalParamSegments: {}\n};\n\nexport function match(\n    segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n  if (route.path === '') {\n    if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n      return {...noMatch};\n    }\n\n    return {\n      matched: true,\n      consumedSegments: [],\n      lastChild: 0,\n      parameters: {},\n      positionalParamSegments: {}\n    };\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n  if (!res) return {...noMatch};\n\n  const posParams: {[n: string]: string} = {};\n  forEach(res.posParams!, (v: UrlSegment, k: string) => {\n    posParams[k] = v.path;\n  });\n  const parameters = res.consumed.length > 0 ?\n      {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n      posParams;\n\n  return {\n    matched: true,\n    consumedSegments: res.consumed,\n    lastChild: res.consumed.length,\n    // TODO(atscott): investigate combining parameters and positionalParamSegments\n    parameters,\n    positionalParamSegments: res.posParams ?? {}\n  };\n}\n\nexport function split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[], relativeLinkResolution: 'legacy'|'corrected' = 'corrected') {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments,\n        createChildrenForEmptyPaths(\n            segmentGroup, consumedSegments, config,\n            new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments,\n        addEmptyPathsToChildrenIfNeeded(\n            segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children,\n            relativeLinkResolution));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments};\n  }\n\n  const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n  s._sourceSegment = segmentGroup;\n  s._segmentIndexShift = consumedSegments.length;\n  return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    routes: Route[], children: {[name: string]: UrlSegmentGroup},\n    relativeLinkResolution: 'legacy'|'corrected'): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  for (const r of routes) {\n    if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      if (relativeLinkResolution === 'legacy') {\n        s._segmentIndexShift = segmentGroup.segments.length;\n      } else {\n        s._segmentIndexShift = consumedSegments.length;\n      }\n      res[getOutlet(r)] = s;\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n    primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegment;\n  primarySegment._sourceSegment = segmentGroup;\n  primarySegment._segmentIndexShift = consumedSegments.length;\n\n  for (const r of routes) {\n    if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      s._segmentIndexShift = consumedSegments.length;\n      res[getOutlet(r)] = s;\n    }\n  }\n  return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '';\n}\n\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nexport function isImmediateMatch(\n    route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n  // a config like\n  // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n  // or even\n  // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n  //\n  // The exception here is when the segment outlet is for the primary outlet. This would\n  // result in a match inside the named outlet because all children there are written as primary\n  // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n  // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n  // This should only match if the url is `/(x:b)`.\n  if (getOutlet(route) !== outlet &&\n      (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n    return false;\n  }\n  if (route.path === '**') {\n    return true;\n  }\n  return match(rawSegment, route, segments).matched;\n}\n\nexport function noLeftoversInUrl(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  return segments.length === 0 && !segmentGroup.children[outlet];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, from, Observable, Observer, of} from 'rxjs';\nimport {catchError, concatMap, first, last, map, mergeMap, scan, tap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {prioritizedGuardValue} from './operators/prioritized_guard_value';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {navigationCancelingError, Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, wrapIntoObservable} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {isCanLoad, isFunction, isUrlTree} from './utils/type_guards';\n\nclass NoMatch {\n  public segmentGroup: UrlSegmentGroup|null;\n\n  constructor(segmentGroup?: UrlSegmentGroup) {\n    this.segmentGroup = segmentGroup || null;\n  }\n}\n\nclass AbsoluteRedirect {\n  constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n          `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n  return new Observable<LoadedRouterConfig>(\n      (obs: Observer<LoadedRouterConfig>) => obs.error(\n          navigationCancelingError(`Cannot load children because the guard of the route \"path: '${\n              route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n  return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n  private allowRedirects: boolean = true;\n  private ngModule: NgModuleRef<any>;\n\n  constructor(\n      moduleInjector: Injector, private configLoader: RouterConfigLoader,\n      private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n    this.ngModule = moduleInjector.get(NgModuleRef);\n  }\n\n  apply(): Observable<UrlTree> {\n    const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n    // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is\n    // only necessary to prevent failures in tests which assert exact object matches. The `split` is\n    // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these\n    // properties. Before the implementations were merged, the `applyRedirects` would not assign\n    // them. We should be able to remove this logic as a \"breaking change\" but should do some more\n    // investigation into the failures first.\n    const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children);\n\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    const urlTrees$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n    }));\n    return urlTrees$.pipe(catchError((e: any) => {\n      if (e instanceof AbsoluteRedirect) {\n        // After an absolute redirect we do not apply any more redirects!\n        // If this implementation changes, update the documentation note in `redirectTo`.\n        this.allowRedirects = false;\n        // we need to run matching, so we can fetch all lazy-loaded modules\n        return this.match(e.urlTree);\n      }\n\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private match(tree: UrlTree): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n    const mapped$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n    }));\n    return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private noMatchError(e: NoMatch): any {\n    return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n  }\n\n  private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string|null):\n      UrlTree {\n    const root = rootCandidate.segments.length > 0 ?\n        new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n        rootCandidate;\n    return new UrlTree(root, queryParams, fragment);\n  }\n\n  private expandSegmentGroup(\n      ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n      outlet: string): Observable<UrlSegmentGroup> {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.expandChildren(ngModule, routes, segmentGroup)\n          .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n    }\n\n    return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n  }\n\n  // Recursively expand segment groups for all the child outlets\n  private expandChildren(\n      ngModule: NgModuleRef<any>, routes: Route[],\n      segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n    // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n    // because an absolute redirect from the primary outlet takes precedence.\n    const childOutlets: string[] = [];\n    for (const child of Object.keys(segmentGroup.children)) {\n      if (child === 'primary') {\n        childOutlets.unshift(child);\n      } else {\n        childOutlets.push(child);\n      }\n    }\n\n    return from(childOutlets)\n        .pipe(\n            concatMap(childOutlet => {\n              const child = segmentGroup.children[childOutlet];\n              // Sort the routes so routes with outlets that match the segment appear\n              // first, followed by routes for other outlets, which might match if they have an\n              // empty path.\n              const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n              return this.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet)\n                  .pipe(map(s => ({segment: s, outlet: childOutlet})));\n            }),\n            scan(\n                (children, expandedChild) => {\n                  children[expandedChild.outlet] = expandedChild.segment;\n                  return children;\n                },\n                {} as {[outlet: string]: UrlSegmentGroup}),\n            last(),\n        );\n  }\n\n  private expandSegment(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n      segments: UrlSegment[], outlet: string,\n      allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    return from(routes).pipe(\n        concatMap((r: any) => {\n          const expanded$ = this.expandSegmentAgainstRoute(\n              ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n          return expanded$.pipe(catchError((e: any) => {\n            if (e instanceof NoMatch) {\n              return of(null);\n            }\n            throw e;\n          }));\n        }),\n        first((s): s is UrlSegmentGroup => !!s), catchError((e: any, _: any) => {\n          if (e instanceof EmptyError || e.name === 'EmptyError') {\n            if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n              return of(new UrlSegmentGroup([], {}));\n            }\n            throw new NoMatch(segmentGroup);\n          }\n          throw e;\n        }));\n  }\n\n  private expandSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n      return noMatch(segmentGroup);\n    }\n\n    if (route.redirectTo === undefined) {\n      return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet);\n    }\n\n    if (allowRedirects && this.allowRedirects) {\n      return this.expandSegmentAgainstRouteUsingRedirect(\n          ngModule, segmentGroup, routes, route, paths, outlet);\n    }\n\n    return noMatch(segmentGroup);\n  }\n\n  private expandSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n          ngModule, routes, route, outlet);\n    }\n\n    return this.expandRegularSegmentAgainstRouteUsingRedirect(\n        ngModule, segmentGroup, routes, route, segments, outlet);\n  }\n\n  private expandWildCardWithParamsAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n      outlet: string): Observable<UrlSegmentGroup> {\n    const newTree = this.applyRedirectCommands([], route.redirectTo!, {});\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      const group = new UrlSegmentGroup(newSegments, {});\n      return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n    }));\n  }\n\n  private expandRegularSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    const {matched, consumedSegments, lastChild, positionalParamSegments} =\n        match(segmentGroup, route, segments);\n    if (!matched) return noMatch(segmentGroup);\n\n    const newTree =\n        this.applyRedirectCommands(consumedSegments, route.redirectTo!, positionalParamSegments);\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      return this.expandSegment(\n          ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n          false);\n    }));\n  }\n\n  private matchSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      if (route.loadChildren) {\n        const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                              this.configLoader.load(ngModule.injector, route);\n        return loaded$.pipe(map((cfg: LoadedRouterConfig) => {\n          route._loadedConfig = cfg;\n          return new UrlSegmentGroup(segments, {});\n        }));\n      }\n\n      return of(new UrlSegmentGroup(segments, {}));\n    }\n\n    const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n    if (!matched) return noMatch(rawSegmentGroup);\n\n    const rawSlicedSegments = segments.slice(lastChild);\n    const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n    return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n      const childModule = routerConfig.module;\n      const childConfig = routerConfig.routes;\n\n      const {segmentGroup: splitSegmentGroup, slicedSegments} =\n          split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n      // See comment on the other call to `split` about why this is necessary.\n      const segmentGroup =\n          new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n\n      if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n        const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n        return expanded$.pipe(\n            map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n      }\n\n      if (childConfig.length === 0 && slicedSegments.length === 0) {\n        return of(new UrlSegmentGroup(consumedSegments, {}));\n      }\n\n      const matchedOnOutlet = getOutlet(route) === outlet;\n      const expanded$ = this.expandSegment(\n          childModule, segmentGroup, childConfig, slicedSegments,\n          matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n      return expanded$.pipe(\n          map((cs: UrlSegmentGroup) =>\n                  new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n    }));\n  }\n\n  private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n      Observable<LoadedRouterConfig> {\n    if (route.children) {\n      // The children belong to the same module\n      return of(new LoadedRouterConfig(route.children, ngModule));\n    }\n\n    if (route.loadChildren) {\n      // lazy children belong to the loaded module\n      if (route._loadedConfig !== undefined) {\n        return of(route._loadedConfig);\n      }\n\n      return this.runCanLoadGuards(ngModule.injector, route, segments)\n          .pipe(mergeMap((shouldLoadResult: boolean) => {\n            if (shouldLoadResult) {\n              return this.configLoader.load(ngModule.injector, route)\n                  .pipe(map((cfg: LoadedRouterConfig) => {\n                    route._loadedConfig = cfg;\n                    return cfg;\n                  }));\n            }\n            return canLoadFails(route);\n          }));\n    }\n\n    return of(new LoadedRouterConfig([], ngModule));\n  }\n\n  private runCanLoadGuards(moduleInjector: Injector, route: Route, segments: UrlSegment[]):\n      Observable<boolean> {\n    const canLoad = route.canLoad;\n    if (!canLoad || canLoad.length === 0) return of(true);\n\n    const canLoadObservables = canLoad.map((injectionToken: any) => {\n      const guard = moduleInjector.get(injectionToken);\n      let guardVal;\n      if (isCanLoad(guard)) {\n        guardVal = guard.canLoad(route, segments);\n      } else if (isFunction<CanLoadFn>(guard)) {\n        guardVal = guard(route, segments);\n      } else {\n        throw new Error('Invalid CanLoad guard');\n      }\n      return wrapIntoObservable(guardVal);\n    });\n\n    return of(canLoadObservables)\n        .pipe(\n            prioritizedGuardValue(),\n            tap((result: UrlTree|boolean) => {\n              if (!isUrlTree(result)) return;\n\n              const error: Error&{url?: UrlTree} = navigationCancelingError(\n                  `Redirecting to \"${this.urlSerializer.serialize(result)}\"`);\n              error.url = result;\n              throw error;\n            }),\n            map(result => result === true),\n        );\n  }\n\n  private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n    let res: UrlSegment[] = [];\n    let c = urlTree.root;\n    while (true) {\n      res = res.concat(c.segments);\n      if (c.numberOfChildren === 0) {\n        return of(res);\n      }\n\n      if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n        return namedOutletsRedirect(route.redirectTo!);\n      }\n\n      c = c.children[PRIMARY_OUTLET];\n    }\n  }\n\n  private applyRedirectCommands(\n      segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n    return this.applyRedirectCreatreUrlTree(\n        redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n  }\n\n  private applyRedirectCreatreUrlTree(\n      redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlTree {\n    const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n    return new UrlTree(\n        newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n        urlTree.fragment);\n  }\n\n  private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n    const res: Params = {};\n    forEach(redirectToParams, (v: any, k: string) => {\n      const copySourceValue = typeof v === 'string' && v.startsWith(':');\n      if (copySourceValue) {\n        const sourceName = v.substring(1);\n        res[k] = actualParams[sourceName];\n      } else {\n        res[k] = v;\n      }\n    });\n    return res;\n  }\n\n  private createSegmentGroup(\n      redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n    const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n    let children: {[n: string]: UrlSegmentGroup} = {};\n    forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n      children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n    });\n\n    return new UrlSegmentGroup(updatedSegments, children);\n  }\n\n  private createSegments(\n      redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n    return redirectToSegments.map(\n        s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n                                      this.findOrReturn(s, actualSegments));\n  }\n\n  private findPosParam(\n      redirectTo: string, redirectToUrlSegment: UrlSegment,\n      posParams: {[k: string]: UrlSegment}): UrlSegment {\n    const pos = posParams[redirectToUrlSegment.path.substring(1)];\n    if (!pos)\n      throw new Error(\n          `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n    return pos;\n  }\n\n  private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n    let idx = 0;\n    for (const s of actualSegments) {\n      if (s.path === redirectToUrlSegment.path) {\n        actualSegments.splice(idx);\n        return s;\n      }\n      idx++;\n    }\n    return redirectToUrlSegment;\n  }\n}\n\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n  if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n    const c = s.children[PRIMARY_OUTLET];\n    return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n  }\n\n  return s;\n}\n\n/**\n * Recursively merges primary segment children into their parents and also drops empty children\n * (those which have no segments and no children themselves). The latter prevents serializing a\n * group into something like `/a(aux:)`, where `aux` is an empty child segment.\n */\nfunction squashSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  const newChildren = {} as any;\n  for (const childOutlet of Object.keys(segmentGroup.children)) {\n    const child = segmentGroup.children[childOutlet];\n    const childCandidate = squashSegmentGroup(child);\n    // don't add empty children\n    if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n      newChildren[childOutlet] = childCandidate;\n    }\n  }\n  const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n  return mergeTrivialChildren(s);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n  return switchMap(\n      t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n               .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, equalParamsAndUrlSegments, RouterStateSnapshot} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport class CanActivate {\n  readonly route: ActivatedRouteSnapshot;\n  constructor(public path: ActivatedRouteSnapshot[]) {\n    this.route = this.path[this.path.length - 1];\n  }\n}\n\nexport class CanDeactivate {\n  constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n  canDeactivateChecks: CanDeactivate[],\n  canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n    future: RouterStateSnapshot, curr: RouterStateSnapshot,\n    parentContexts: ChildrenOutletContexts) {\n  const futureRoot = future._root;\n  const currRoot = curr ? curr._root : null;\n\n  return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n    {node: ActivatedRouteSnapshot, guards: any[]}|null {\n  const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n  if (!canActivateChild || canActivateChild.length === 0) return null;\n  return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n    token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n  const config = getClosestLoadedConfig(snapshot);\n  const injector = config ? config.module.injector : moduleInjector;\n  return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  if (!snapshot) return null;\n\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n  }\n\n  return null;\n}\n\nfunction getChildRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>|null,\n    contexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[], checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const prevChildren = nodeChildrenAsMap(currNode);\n\n  // Process the children of the future route\n  futureNode.children.forEach(c => {\n    getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n    delete prevChildren[c.value.outlet];\n  });\n\n  // Process any children left from the current route (not active for the future route)\n  forEach(\n      prevChildren,\n      (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n          deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks));\n\n  return checks;\n}\n\nfunction getRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n    parentContexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[],\n    checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const future = futureNode.value;\n  const curr = currNode ? currNode.value : null;\n  const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n  // reusing the node\n  if (curr && future.routeConfig === curr.routeConfig) {\n    const shouldRun =\n        shouldRunGuardsAndResolvers(curr, future, future.routeConfig!.runGuardsAndResolvers);\n    if (shouldRun) {\n      checks.canActivateChecks.push(new CanActivate(futurePath));\n    } else {\n      // we need to set the data\n      future.data = curr.data;\n      future._resolvedData = curr._resolvedData;\n    }\n\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(\n          futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n    }\n\n    if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n      checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n    }\n  } else {\n    if (curr) {\n      deactivateRouteAndItsChildren(currNode, context, checks);\n    }\n\n    checks.canActivateChecks.push(new CanActivate(futurePath));\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n    }\n  }\n\n  return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n    curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n    mode: RunGuardsAndResolvers|undefined): boolean {\n  if (typeof mode === 'function') {\n    return mode(curr, future);\n  }\n  switch (mode) {\n    case 'pathParamsChange':\n      return !equalPath(curr.url, future.url);\n\n    case 'pathParamsOrQueryParamsChange':\n      return !equalPath(curr.url, future.url) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'always':\n      return true;\n\n    case 'paramsOrQueryParamsChange':\n      return !equalParamsAndUrlSegments(curr, future) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'paramsChange':\n    default:\n      return !equalParamsAndUrlSegments(curr, future);\n  }\n}\n\nfunction deactivateRouteAndItsChildren(\n    route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext|null, checks: Checks): void {\n  const children = nodeChildrenAsMap(route);\n  const r = route.value;\n\n  forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n    if (!r.component) {\n      deactivateRouteAndItsChildren(node, context, checks);\n    } else if (context) {\n      deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n    } else {\n      deactivateRouteAndItsChildren(node, null, checks);\n    }\n  });\n\n  if (!r.component) {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  } else if (context && context.outlet && context.outlet.isActivated) {\n    checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n  } else {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {concat, defer, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n    MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n    if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n      return of({...t, guardsResult: true});\n    }\n\n    return runCanDeactivateChecks(\n               canDeactivateChecks, targetSnapshot!, currentSnapshot, moduleInjector)\n        .pipe(\n            mergeMap(canDeactivate => {\n              return canDeactivate && isBoolean(canDeactivate) ?\n                  runCanActivateChecks(\n                      targetSnapshot!, canActivateChecks, moduleInjector, forwardEvent) :\n                  of(canDeactivate);\n            }),\n            map(guardsResult => ({...t, guardsResult})));\n  });\n}\n\nfunction runCanDeactivateChecks(\n    checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n    moduleInjector: Injector) {\n  return from(checks).pipe(\n      mergeMap(\n          check =>\n              runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n    futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n    forwardEvent?: (evt: Event) => void) {\n  return from(checks).pipe(\n      concatMap((check: CanActivate) => {\n        return concat(\n            fireChildActivationStart(check.route.parent, forwardEvent),\n            fireActivationStart(check.route, forwardEvent),\n            runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n            runCanActivate(futureSnapshot, check.route, moduleInjector));\n      }),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ActivationStart(snapshot));\n  }\n  return of(true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ChildActivationStart(snapshot));\n  }\n  return of(true);\n}\n\nfunction runCanActivate(\n    futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n  if (!canActivate || canActivate.length === 0) return of(true);\n\n  const canActivateObservables = canActivate.map((c: any) => {\n    return defer(() => {\n      const guard = getToken(c, futureARS, moduleInjector);\n      let observable;\n      if (isCanActivate(guard)) {\n        observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n      } else if (isFunction<CanActivateFn>(guard)) {\n        observable = wrapIntoObservable(guard(futureARS, futureRSS));\n      } else {\n        throw new Error('Invalid CanActivate guard');\n      }\n      return observable.pipe(first());\n    });\n  });\n  return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n    futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const futureARS = path[path.length - 1];\n\n  const canActivateChildGuards = path.slice(0, path.length - 1)\n                                     .reverse()\n                                     .map(p => getCanActivateChild(p))\n                                     .filter(_ => _ !== null);\n\n  const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n    return defer(() => {\n      const guardsMapped = d.guards.map((c: any) => {\n        const guard = getToken(c, d.node, moduleInjector);\n        let observable;\n        if (isCanActivateChild(guard)) {\n          observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n        } else if (isFunction<CanActivateChildFn>(guard)) {\n          observable = wrapIntoObservable(guard(futureARS, futureRSS));\n        } else {\n          throw new Error('Invalid CanActivateChild guard');\n        }\n        return observable.pipe(first());\n      });\n      return of(guardsMapped).pipe(prioritizedGuardValue());\n    });\n  });\n  return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n    component: Object|null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n    futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n  if (!canDeactivate || canDeactivate.length === 0) return of(true);\n  const canDeactivateObservables = canDeactivate.map((c: any) => {\n    const guard = getToken(c, currARS, moduleInjector);\n    let observable;\n    if (isCanDeactivate(guard)) {\n      observable = wrapIntoObservable(guard.canDeactivate(component!, currARS, currRSS, futureRSS));\n    } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n      observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n    } else {\n      throw new Error('Invalid CanDeactivate guard');\n    }\n    return observable.pipe(first());\n  });\n  return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of} from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, ParamsInheritanceStrategy, RouterStateSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {last} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nfunction newObservableError(e: unknown): Observable<RouterStateSnapshot> {\n  // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n  return new Observable<RouterStateSnapshot>((obs: Observer<RouterStateSnapshot>) => obs.error(e));\n}\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Routes, urlTree: UrlTree, url: string,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n    relativeLinkResolution: 'legacy'|'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n  try {\n    const result = new Recognizer(\n                       rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n                       relativeLinkResolution)\n                       .recognize();\n    if (result === null) {\n      return newObservableError(new NoMatch());\n    } else {\n      return of(result);\n    }\n  } catch (e) {\n    // Catch the potential error from recognize due to duplicate outlet matches and return as an\n    // `Observable` error instead.\n    return newObservableError(e);\n  }\n}\n\nexport class Recognizer {\n  constructor(\n      private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n      private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n      private relativeLinkResolution: 'legacy'|'corrected') {}\n\n  recognize(): RouterStateSnapshot|null {\n    const rootSegmentGroup =\n        split(\n            this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined),\n            this.relativeLinkResolution)\n            .segmentGroup;\n\n    const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    if (children === null) {\n      return null;\n    }\n\n    // Use Object.freeze to prevent readers of the Router state from modifying it outside of a\n    // navigation, resulting in the router being out of sync with the browser.\n    const root = new ActivatedRouteSnapshot(\n        [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n        {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n\n    const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n    const routeState = new RouterStateSnapshot(this.url, rootNode);\n    this.inheritParamsAndData(routeState._root);\n    return routeState;\n  }\n\n  inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n    const route = routeNode.value;\n\n    const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n    route.params = Object.freeze(i.params);\n    route.data = Object.freeze(i.data);\n\n    routeNode.children.forEach(n => this.inheritParamsAndData(n));\n  }\n\n  processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.processChildren(config, segmentGroup);\n    }\n\n    return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n  }\n\n  /**\n   * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n   * we cannot find a match for _any_ of the children.\n   *\n   * @param config - The `Routes` to match against\n   * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n   *     config.\n   */\n  processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    const children: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n    for (const childOutlet of Object.keys(segmentGroup.children)) {\n      const child = segmentGroup.children[childOutlet];\n      // Sort the config so that routes with outlets that match the one being activated appear\n      // first, followed by routes for other outlets, which might match if they have an empty path.\n      const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n      const outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet);\n      if (outletChildren === null) {\n        // Configs must match all segment children so because we did not find a match for this\n        // outlet, return `null`.\n        return null;\n      }\n      children.push(...outletChildren);\n    }\n    // Because we may have matched two outlets to the same empty path segment, we can have multiple\n    // activated results for the same outlet. We should merge the children of these results so the\n    // final return value is only one `TreeNode` per outlet.\n    const mergedChildren = mergeEmptyPathMatches(children);\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      // This should really never happen - we are only taking the first match for each outlet and\n      // merge the empty path matches.\n      checkOutletNameUniqueness(mergedChildren);\n    }\n    sortActivatedRouteSnapshots(mergedChildren);\n    return mergedChildren;\n  }\n\n  processSegment(\n      config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    for (const r of config) {\n      const children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n      if (children !== null) {\n        return children;\n      }\n    }\n    if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n      return [];\n    }\n\n    return null;\n  }\n\n  processSegmentAgainstRoute(\n      route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return null;\n\n    let snapshot: ActivatedRouteSnapshot;\n    let consumedSegments: UrlSegment[] = [];\n    let rawSlicedSegments: UrlSegment[] = [];\n\n    if (route.path === '**') {\n      const params = segments.length > 0 ? last(segments)!.parameters : {};\n      snapshot = new ActivatedRouteSnapshot(\n          segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n          getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length,\n          getResolve(route));\n    } else {\n      const result = match(rawSegment, route, segments);\n      if (!result.matched) {\n        return null;\n      }\n      consumedSegments = result.consumedSegments;\n      rawSlicedSegments = segments.slice(result.lastChild);\n\n      snapshot = new ActivatedRouteSnapshot(\n          consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment, getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n    }\n\n    const childConfig: Route[] = getChildConfig(route);\n\n    const {segmentGroup, slicedSegments} = split(\n        rawSegment, consumedSegments, rawSlicedSegments,\n        // Filter out routes with redirectTo because we are trying to create activated route\n        // snapshots and don't handle redirects here. That should have been done in\n        // `applyRedirects`.\n        childConfig.filter(c => c.redirectTo === undefined), this.relativeLinkResolution);\n\n    if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n      const children = this.processChildren(childConfig, segmentGroup);\n      if (children === null) {\n        return null;\n      }\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n    }\n\n    if (childConfig.length === 0 && slicedSegments.length === 0) {\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n    }\n\n    const matchedOnOutlet = getOutlet(route) === outlet;\n    // If we matched a config due to empty path match on a different outlet, we need to continue\n    // passing the current outlet for the segment rather than switch to PRIMARY.\n    // Note that we switch to primary when we have a match because outlet configs look like this:\n    // {path: 'a', outlet: 'a', children: [\n    //  {path: 'b', component: B},\n    //  {path: 'c', component: C},\n    // ]}\n    // Notice that the children of the named outlet are configured with the primary outlet\n    const children = this.processSegment(\n        childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet);\n    if (children === null) {\n      return null;\n    }\n    return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n  }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  nodes.sort((a, b) => {\n    if (a.value.outlet === PRIMARY_OUTLET) return -1;\n    if (b.value.outlet === PRIMARY_OUTLET) return 1;\n    return a.value.outlet.localeCompare(b.value.outlet);\n  });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n  if (route.children) {\n    return route.children;\n  }\n\n  if (route.loadChildren) {\n    return route._loadedConfig!.routes;\n  }\n\n  return [];\n}\n\nfunction hasEmptyPathConfig(node: TreeNode<ActivatedRouteSnapshot>) {\n  const config = node.value.routeConfig;\n  return config && config.path === '' && config.redirectTo === undefined;\n}\n\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the\n * children from each duplicate. This is necessary because different outlets can match a single\n * empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes: Array<TreeNode<ActivatedRouteSnapshot>>):\n    Array<TreeNode<ActivatedRouteSnapshot>> {\n  const result: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n  // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n  const mergedNodes: Set<TreeNode<ActivatedRouteSnapshot>> = new Set();\n\n  for (const node of nodes) {\n    if (!hasEmptyPathConfig(node)) {\n      result.push(node);\n      continue;\n    }\n\n    const duplicateEmptyPathNode =\n        result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n    if (duplicateEmptyPathNode !== undefined) {\n      duplicateEmptyPathNode.children.push(...node.children);\n      mergedNodes.add(duplicateEmptyPathNode);\n    } else {\n      result.push(node);\n    }\n  }\n  // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n  // by also merging those children. This is necessary when there are multiple empty path configs in\n  // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n  // of those children can be combined into a single node as well.\n  for (const mergedNode of mergedNodes) {\n    const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n    result.push(new TreeNode(mergedNode.value, mergedChildren));\n  }\n  return result.filter(n => !mergedNodes.has(n));\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  const names: {[k: string]: ActivatedRouteSnapshot} = {};\n  nodes.forEach(n => {\n    const routeWithSameOutletName = names[n.value.outlet];\n    if (routeWithSameOutletName) {\n      const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n      const c = n.value.url.map(s => s.toString()).join('/');\n      throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n    }\n    names[n.value.outlet] = n.value;\n  });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  let s = segmentGroup;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n  }\n  return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n  let s = segmentGroup;\n  let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  }\n  return res - 1;\n}\n\nfunction getData(route: Route): Data {\n  return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n  return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Route[], serializer: (url: UrlTree) => string,\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    relativeLinkResolution: 'legacy'|'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(\n      t => recognizeFn(\n               rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n               paramsInheritanceStrategy, relativeLinkResolution)\n               .pipe(map(targetSnapshot => ({...t, targetSnapshot}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {EMPTY, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, map, mergeMap, takeLast, tap} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, RouterStateSnapshot} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n    if (!canActivateChecks.length) {\n      return of(t);\n    }\n    let canActivateChecksResolved = 0;\n    return from(canActivateChecks)\n        .pipe(\n            concatMap(\n                check => runResolve(\n                    check.route, targetSnapshot!, paramsInheritanceStrategy, moduleInjector)),\n            tap(() => canActivateChecksResolved++),\n            takeLast(1),\n            mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY),\n        );\n  });\n}\n\nfunction runResolve(\n    futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    paramsInheritanceStrategy: 'emptyOnly'|'always', moduleInjector: Injector) {\n  const resolve = futureARS._resolve;\n  return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n      .pipe(map((resolvedData: any) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = {\n          ...futureARS.data,\n          ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve\n        };\n        return null;\n      }));\n}\n\nfunction resolveNode(\n    resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const keys = Object.keys(resolve);\n  if (keys.length === 0) {\n    return of({});\n  }\n  const data: {[k: string]: any} = {};\n  return from(keys).pipe(\n      mergeMap(\n          (key: string) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n                               .pipe(tap((value: any) => {\n                                 data[key] = value;\n                               }))),\n      takeLast(1),\n      mergeMap(() => {\n        // Ensure all resolvers returned values, otherwise don't emit any \"next\" and just complete\n        // the chain which will cancel navigation\n        if (Object.keys(data).length === keys.length) {\n          return of(data);\n        }\n        return EMPTY;\n      }),\n  );\n}\n\nfunction getResolver(\n    injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const resolver = getToken(injectionToken, futureARS, moduleInjector);\n  return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n                            wrapIntoObservable(resolver(futureARS, futureRSS));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {from, MonoTypeOperatorFunction, ObservableInput, of} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n    MonoTypeOperatorFunction<T> {\n  return switchMap(v => {\n    const nextResult = next(v);\n    if (nextResult) {\n      return from(nextResult).pipe(map(() => v));\n    }\n    return of(v);\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n  contexts: Map<string, OutletContext>,\n  componentRef: ComponentRef<any>,\n  route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n  /** Determines if this route (and its subtree) should be detached to be reused later */\n  abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n  /**\n   * Stores the detached route.\n   *\n   * Storing a `null` value should erase the previously stored value.\n   */\n  abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n  /** Determines if this route (and its subtree) should be reattached */\n  abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n  /** Retrieves the previously stored route */\n  abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n  /** Determines if a route should be reused */\n  abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the fragment or query parameters change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nexport abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\n  /**\n   * Whether the given route should detach for later reuse.\n   * Always returns false for `BaseRouteReuseStrategy`.\n   * */\n  shouldDetach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /**\n   * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n   */\n  store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n\n  /** Returns `false`, meaning the route (and its subtree) is never reattached */\n  shouldAttach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /** Returns `null` because this strategy does not store routes for later re-use. */\n  retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null {\n    return null;\n  }\n\n  /**\n   * Determines if a route should be reused.\n   * This strategy returns `true` when the future route config and current route config are\n   * identical.\n   */\n  shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n    return future.routeConfig === curr.routeConfig;\n  }\n}\n\nexport class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectFlags, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {ConnectableObservable, from, Observable, of, Subject} from 'rxjs';\nimport {catchError, map, mergeMap, refCount, tap} from 'rxjs/operators';\n\nimport {LoadChildren, LoadedRouterConfig, Route} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\nimport {standardizeConfig} from './utils/config';\n\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n  constructor(\n      private loader: NgModuleFactoryLoader, private compiler: Compiler,\n      private onLoadStartListener?: (r: Route) => void,\n      private onLoadEndListener?: (r: Route) => void) {}\n\n  load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n    if (route._loader$) {\n      return route._loader$;\n    }\n\n    if (this.onLoadStartListener) {\n      this.onLoadStartListener(route);\n    }\n    const moduleFactory$ = this.loadModuleFactory(route.loadChildren!);\n    const loadRunner = moduleFactory$.pipe(\n        map((factory: NgModuleFactory<any>) => {\n          if (this.onLoadEndListener) {\n            this.onLoadEndListener(route);\n          }\n          const module = factory.create(parentInjector);\n          // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n          // will get stuck in an infinite loop. The child module's Injector will look to\n          // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n          // for it's parent module instead.\n          return new LoadedRouterConfig(\n              flatten(\n                  module.injector.get(ROUTES, undefined, InjectFlags.Self | InjectFlags.Optional))\n                  .map(standardizeConfig),\n              module);\n        }),\n        catchError((err) => {\n          route._loader$ = undefined;\n          throw err;\n        }),\n    );\n    // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n    route._loader$ = new ConnectableObservable(loadRunner, () => new Subject<LoadedRouterConfig>())\n                         .pipe(refCount());\n    return route._loader$;\n  }\n\n  private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n    if (typeof loadChildren === 'string') {\n      return from(this.loader.load(loadChildren));\n    } else {\n      return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n        if (t instanceof NgModuleFactory) {\n          return of(t);\n        } else {\n          return from(this.compiler.compileModuleAsync(t));\n        }\n      }));\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutletContract} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n  outlet: RouterOutletContract|null = null;\n  route: ActivatedRoute|null = null;\n  resolver: ComponentFactoryResolver|null = null;\n  children = new ChildrenOutletContexts();\n  attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n  // contexts for child outlets, by name.\n  private contexts = new Map<string, OutletContext>();\n\n  /** Called when a `RouterOutlet` directive is instantiated */\n  onChildOutletCreated(childName: string, outlet: RouterOutletContract): void {\n    const context = this.getOrCreateContext(childName);\n    context.outlet = outlet;\n    this.contexts.set(childName, context);\n  }\n\n  /**\n   * Called when a `RouterOutlet` directive is destroyed.\n   * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n   * re-created later.\n   */\n  onChildOutletDestroyed(childName: string): void {\n    const context = this.getContext(childName);\n    if (context) {\n      context.outlet = null;\n      context.attachRef = null;\n    }\n  }\n\n  /**\n   * Called when the corresponding route is deactivated during navigation.\n   * Because the component get destroyed, all children outlet are destroyed.\n   */\n  onOutletDeactivated(): Map<string, OutletContext> {\n    const contexts = this.contexts;\n    this.contexts = new Map();\n    return contexts;\n  }\n\n  onOutletReAttached(contexts: Map<string, OutletContext>) {\n    this.contexts = contexts;\n  }\n\n  getOrCreateContext(childName: string): OutletContext {\n    let context = this.getContext(childName);\n\n    if (!context) {\n      context = new OutletContext();\n      this.contexts.set(childName, context);\n    }\n\n    return context;\n  }\n\n  getContext(childName: string): OutletContext|null {\n    return this.contexts.get(childName) || null;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n  /**\n   * Tells the router if this URL should be processed.\n   *\n   * When it returns true, the router will execute the regular navigation.\n   * When it returns false, the router will set the router state to an empty state.\n   * As a result, all the active components will be destroyed.\n   *\n   */\n  abstract shouldProcessUrl(url: UrlTree): boolean;\n\n  /**\n   * Extracts the part of the URL that should be handled by the router.\n   * The rest of the URL will remain untouched.\n   */\n  abstract extract(url: UrlTree): UrlTree;\n\n  /**\n   * Merges the URL fragment with the rest of the URL.\n   */\n  abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n  shouldProcessUrl(url: UrlTree): boolean {\n    return true;\n  }\n  extract(url: UrlTree): UrlTree {\n    return url;\n  }\n  merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree {\n    return newUrlPart;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, PopStateEvent} from '@angular/common';\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, of, Subject, SubscriptionLike} from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, createEmptyState, RouterState, RouterStateSnapshot} from './router_state';\nimport {isNavigationCancelingError, navigationCancelingError, Params} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {containsTree, createEmptyUrlTree, IsActiveMatchOptions, UrlSerializer, UrlTree} from './url_tree';\nimport {standardizeConfig, validateConfig} from './utils/config';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n/**\n * @description\n *\n * Options that modify the `Router` URL.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface UrlCreationOptions {\n  /**\n   * Specifies a root URI to use for relative navigation.\n   *\n   * For example, consider the following route configuration where the parent route\n   * has two children.\n   *\n   * ```\n   * [{\n   *   path: 'parent',\n   *   component: ParentComponent,\n   *   children: [{\n   *     path: 'list',\n   *     component: ListComponent\n   *   },{\n   *     path: 'child',\n   *     component: ChildComponent\n   *   }]\n   * }]\n   * ```\n   *\n   * The following `go()` function navigates to the `list` route by\n   * interpreting the destination URI as relative to the activated `child`  route\n   *\n   * ```\n   *  @Component({...})\n   *  class ChildComponent {\n   *    constructor(private router: Router, private route: ActivatedRoute) {}\n   *\n   *    go() {\n   *      this.router.navigate(['../list'], { relativeTo: this.route });\n   *    }\n   *  }\n   * ```\n   *\n   * A value of `null` or `undefined` indicates that the navigation commands should be applied\n   * relative to the root.\n   */\n  relativeTo?: ActivatedRoute|null;\n\n  /**\n   * Sets query parameters to the URL.\n   *\n   * ```\n   * // Navigate to /results?page=1\n   * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n   * ```\n   */\n  queryParams?: Params|null;\n\n  /**\n   * Sets the hash fragment for the URL.\n   *\n   * ```\n   * // Navigate to /results#top\n   * this.router.navigate(['/results'], { fragment: 'top' });\n   * ```\n   */\n  fragment?: string;\n\n  /**\n   * How to handle query parameters in the router link for the next navigation.\n   * One of:\n   * * `preserve` : Preserve current parameters.\n   * * `merge` : Merge new with current parameters.\n   *\n   * The \"preserve\" option discards any new query params:\n   * ```\n   * // from /view1?page=1 to/view2?page=1\n   * this.router.navigate(['/view2'], { queryParams: { page: 2 },  queryParamsHandling: \"preserve\"\n   * });\n   * ```\n   * The \"merge\" option appends new query params to the params from the current URL:\n   * ```\n   * // from /view1?page=1 to/view2?page=1&otherKey=2\n   * this.router.navigate(['/view2'], { queryParams: { otherKey: 2 },  queryParamsHandling: \"merge\"\n   * });\n   * ```\n   * In case of a key collision between current parameters and those in the `queryParams` object,\n   * the new value is used.\n   *\n   */\n  queryParamsHandling?: QueryParamsHandling|null;\n\n  /**\n   * When true, preserves the URL fragment for the next navigation\n   *\n   * ```\n   * // Preserve fragment from /results#top to /view#top\n   * this.router.navigate(['/view'], { preserveFragment: true });\n   * ```\n   */\n  preserveFragment?: boolean;\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the navigation should be handled.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface NavigationBehaviorOptions {\n  /**\n   * When true, navigates without pushing a new state into history.\n   *\n   * ```\n   * // Navigate silently to /view\n   * this.router.navigate(['/view'], { skipLocationChange: true });\n   * ```\n   */\n  skipLocationChange?: boolean;\n\n  /**\n   * When true, navigates while replacing the current state in history.\n   *\n   * ```\n   * // Navigate to /view\n   * this.router.navigate(['/view'], { replaceUrl: true });\n   * ```\n   */\n  replaceUrl?: boolean;\n\n  /**\n   * Developer-defined state that can be passed to any navigation.\n   * Access this value through the `Navigation.extras` object\n   * returned from the [Router.getCurrentNavigation()\n   * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\n   *\n   * After a navigation completes, the router writes an object containing this\n   * value together with a `navigationId` to `history.state`.\n   * The value is written when `location.go()` or `location.replaceState()`\n   * is called before activating this route.\n   *\n   * Note that `history.state` does not pass an object equality test because\n   * the router adds the `navigationId` on each navigation.\n   *\n   */\n  state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed or interpreted.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n * @see UrlCreationOptions\n * @see NavigationBehaviorOptions\n *\n * @publicApi\n */\nexport interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {}\n\n/**\n * Error handler that is invoked when a navigation error occurs.\n *\n * If the handler returns a value, the navigation Promise is resolved with this value.\n * If the handler throws an exception, the navigation Promise is rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n  throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n    error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n  return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n  [k: string]: any,\n  // TODO(#27607): Remove `navigationId` and `ɵrouterPageId` and move to `ng` or `ɵ` namespace.\n  navigationId: number,\n  // The `ɵ` prefix is there to reduce the chance of colliding with any existing user properties on\n  // the history state.\n  ɵrouterPageId?: number,\n};\n\n/**\n * Information about a navigation operation.\n * Retrieve the most recent navigation object with the\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\n *\n * * *id* : The unique identifier of the current navigation.\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\n * This is the value before the router has parsed or applied redirects to it.\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\n * * *finalUrl* : The extracted URL after redirects have been applied.\n * This URL may not be available immediately, therefore this property can be `undefined`.\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\n * * *trigger* : Identifies how this navigation was triggered.\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n * -- 'popstate'--Triggered by a popstate event.\n * -- 'hashchange'--Triggered by a hashchange event.\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\n * navigation.\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\n * own `previousNavigation`.\n *\n * @publicApi\n */\nexport interface Navigation {\n  /**\n   * The unique identifier of the current navigation.\n   */\n  id: number;\n  /**\n   * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\n   * the value before the router has parsed or applied redirects to it.\n   */\n  initialUrl: string|UrlTree;\n  /**\n   * The initial target URL after being parsed with `UrlSerializer.extract()`.\n   */\n  extractedUrl: UrlTree;\n  /**\n   * The extracted URL after redirects have been applied.\n   * This URL may not be available immediately, therefore this property can be `undefined`.\n   * It is guaranteed to be set after the `RoutesRecognized` event fires.\n   */\n  finalUrl?: UrlTree;\n  /**\n   * Identifies how this navigation was triggered.\n   *\n   * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n   * * 'popstate'--Triggered by a popstate event.\n   * * 'hashchange'--Triggered by a hashchange event.\n   */\n  trigger: 'imperative'|'popstate'|'hashchange';\n  /**\n   * Options that controlled the strategy used for this navigation.\n   * See `NavigationExtras`.\n   */\n  extras: NavigationExtras;\n  /**\n   * The previously successful `Navigation` object. Only one previous navigation\n   * is available, therefore this previous `Navigation` object has a `null` value\n   * for its own `previousNavigation`.\n   */\n  previousNavigation: Navigation|null;\n}\n\nexport type NavigationTransition = {\n  id: number,\n  targetPageId: number,\n  currentUrlTree: UrlTree,\n  currentRawUrl: UrlTree,\n  extractedUrl: UrlTree,\n  urlAfterRedirects: UrlTree,\n  rawUrl: UrlTree,\n  extras: NavigationExtras,\n  resolve: any,\n  reject: any,\n  promise: Promise<boolean>,\n  source: NavigationTrigger,\n  restoredState: RestoredState|null,\n  currentSnapshot: RouterStateSnapshot,\n  targetSnapshot: RouterStateSnapshot|null,\n  currentRouterState: RouterState,\n  targetRouterState: RouterState|null,\n  guards: Checks,\n  guardsResult: boolean|UrlTree|null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}): Observable<void> {\n  return of(null) as any;\n}\n\n/**\n * Information related to a location change, necessary for scheduling follow-up Router navigations.\n */\ntype LocationChangeInfo = {\n  source: 'popstate'|'hashchange',\n  urlTree: UrlTree,\n  state: RestoredState|null,\n  transitionId: number\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nexport const exactMatchOptions: IsActiveMatchOptions = {\n  paths: 'exact',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'exact'\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nexport const subsetMatchOptions: IsActiveMatchOptions = {\n  paths: 'subset',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'subset'\n};\n\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Injectable()\nexport class Router {\n  /**\n   * Represents the activated `UrlTree` that the `Router` is configured to handle (through\n   * `UrlHandlingStrategy`). That is, after we find the route config tree that we're going to\n   * activate, run guards, and are just about to activate the route, we set the currentUrlTree.\n   *\n   * This should match the `browserUrlTree` when a navigation succeeds. If the\n   * `UrlHandlingStrategy.shouldProcessUrl` is `false`, only the `browserUrlTree` is updated.\n   */\n  private currentUrlTree: UrlTree;\n  /**\n   * Meant to represent the entire browser url after a successful navigation. In the life of a\n   * navigation transition:\n   * 1. The rawUrl represents the full URL that's being navigated to\n   * 2. We apply redirects, which might only apply to _part_ of the URL (due to\n   * `UrlHandlingStrategy`).\n   * 3. Right before activation (because we assume activation will succeed), we update the\n   * rawUrlTree to be a combination of the urlAfterRedirects (again, this might only apply to part\n   * of the initial url) and the rawUrl of the transition (which was the original navigation url in\n   * its full form).\n   */\n  private rawUrlTree: UrlTree;\n  /**\n   * Meant to represent the part of the browser url that the `Router` is set up to handle (via the\n   * `UrlHandlingStrategy`). This value is updated immediately after the browser url is updated (or\n   * the browser url update is skipped via `skipLocationChange`). With that, note that\n   * `browserUrlTree` _may not_ reflect the actual browser URL for two reasons:\n   *\n   * 1. `UrlHandlingStrategy` only handles part of the URL\n   * 2. `skipLocationChange` does not update the browser url.\n   *\n   * So to reiterate, `browserUrlTree` only represents the Router's internal understanding of the\n   * current route, either before guards with `urlUpdateStrategy === 'eager'` or right before\n   * activation with `'deferred'`.\n   *\n   * This should match the `currentUrlTree` when the navigation succeeds.\n   */\n  private browserUrlTree: UrlTree;\n  private readonly transitions: BehaviorSubject<NavigationTransition>;\n  private navigations: Observable<NavigationTransition>;\n  private lastSuccessfulNavigation: Navigation|null = null;\n  private currentNavigation: Navigation|null = null;\n  private disposed = false;\n\n  private locationSubscription?: SubscriptionLike;\n  /**\n   * Tracks the previously seen location change from the location subscription so we can compare\n   * the two latest to see if they are duplicates. See setUpLocationChangeListener.\n   */\n  private lastLocationChangeInfo: LocationChangeInfo|null = null;\n  private navigationId: number = 0;\n\n  /**\n   * The id of the currently active page in the router.\n   * Updated to the transition's target id on a successful navigation.\n   *\n   * This is used to track what page the router last activated. When an attempted navigation fails,\n   * the router can then use this to compute how to restore the state back to the previously active\n   * page.\n   */\n  private currentPageId: number = 0;\n  /**\n   * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n   * important for computing the target page id for new navigations because we need to ensure each\n   * page id in the browser history is 1 more than the previous entry.\n   */\n  private get browserPageId(): number|undefined {\n    return (this.location.getState() as RestoredState | null)?.ɵrouterPageId;\n  }\n  private configLoader: RouterConfigLoader;\n  private ngModule: NgModuleRef<any>;\n  private console: Console;\n  private isNgZoneEnabled: boolean = false;\n\n  /**\n   * An event stream for routing events in this NgModule.\n   */\n  public readonly events: Observable<Event> = new Subject<Event>();\n  /**\n   * The current state of routing in this NgModule.\n   */\n  public readonly routerState: RouterState;\n\n  /**\n   * A handler for navigation errors in this NgModule.\n   */\n  errorHandler: ErrorHandler = defaultErrorHandler;\n\n  /**\n   * A handler for errors thrown by `Router.parseUrl(url)`\n   * when `url` contains an invalid character.\n   * The most common case is a `%` sign\n   * that's not encoded and is not part of a percent encoded sequence.\n   */\n  malformedUriErrorHandler:\n      (error: URIError, urlSerializer: UrlSerializer,\n       url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n  /**\n   * True if at least one navigation event has occurred,\n   * false otherwise.\n   */\n  navigated: boolean = false;\n  private lastSuccessfulId: number = -1;\n\n  /**\n   * Hooks that enable you to pause navigation,\n   * either before or after the preactivation phase.\n   * Used by `RouterModule`.\n   *\n   * @internal\n   */\n  hooks: {\n    beforePreactivation: RouterHook,\n    afterPreactivation: RouterHook\n  } = {beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook};\n\n  /**\n   * A strategy for extracting and merging URLs.\n   * Used for AngularJS to Angular migrations.\n   */\n  urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n  /**\n   * A strategy for re-using routes.\n   */\n  routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n  /**\n   * How to handle a navigation request to the current URL. One of:\n   *\n   * - `'ignore'` :  The router ignores the request.\n   * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\n   *\n   * Note that this only configures whether the Route reprocesses the URL and triggers related\n   * action and events like redirects, guards, and resolvers. By default, the router re-uses a\n   * component instance when it re-navigates to the same component type without visiting a different\n   * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload\n   * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`\n   * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.\n   */\n  onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n  /**\n   * How to merge parameters, data, and resolved data from parent to child\n   * routes. One of:\n   *\n   * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n   * for path-less or component-less routes.\n   * - `'always'` : Inherit parent parameters, data, and resolved data\n   * for all child routes.\n   */\n  paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n  /**\n   * Determines when the router updates the browser URL.\n   * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n   * Set to `'eager'` to update the browser URL at the beginning of navigation.\n   * You can choose to update early so that, if navigation fails,\n   * you can show an error message with the URL that failed.\n   */\n  urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * @see `RouterModule`\n   */\n  relativeLinkResolution: 'legacy'|'corrected' = 'corrected';\n\n  /**\n   * Configures how the Router attempts to restore state when a navigation is cancelled.\n   *\n   * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n   * router before the navigation started.\n   *\n   * 'computed' - Will always return to the same state that corresponds to the actual Angular route\n   * when the navigation gets cancelled right after triggering a `popstate` event.\n   *\n   * The default value is `replace`\n   *\n   * @internal\n   */\n  // TODO(atscott): Determine how/when/if to make this public API\n  // This shouldn’t be an option at all but may need to be in order to allow migration without a\n  // breaking change. We need to determine if it should be made into public api (or if we forgo\n  // the option and release as a breaking change bug fix in a major version).\n  canceledNavigationResolution: 'replace'|'computed' = 'replace';\n\n  /**\n   * Creates the router service.\n   */\n  // TODO: vsavkin make internal after the final is out.\n  constructor(\n      private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n      private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n      loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n    const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n    const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.ngModule = injector.get(NgModuleRef);\n    this.console = injector.get(Console);\n    const ngZone = injector.get(NgZone);\n    this.isNgZoneEnabled = ngZone instanceof NgZone && NgZone.isInAngularZone();\n\n    this.resetConfig(config);\n    this.currentUrlTree = createEmptyUrlTree();\n    this.rawUrlTree = this.currentUrlTree;\n    this.browserUrlTree = this.currentUrlTree;\n\n    this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n    this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n    this.transitions = new BehaviorSubject<NavigationTransition>({\n      id: 0,\n      targetPageId: 0,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.currentUrlTree,\n      extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      rawUrl: this.currentUrlTree,\n      extras: {},\n      resolve: null,\n      reject: null,\n      promise: Promise.resolve(true),\n      source: 'imperative',\n      restoredState: null,\n      currentSnapshot: this.routerState.snapshot,\n      targetSnapshot: null,\n      currentRouterState: this.routerState,\n      targetRouterState: null,\n      guards: {canActivateChecks: [], canDeactivateChecks: []},\n      guardsResult: null,\n    });\n    this.navigations = this.setupNavigations(this.transitions);\n\n    this.processNavigations();\n  }\n\n  private setupNavigations(transitions: Observable<NavigationTransition>):\n      Observable<NavigationTransition> {\n    const eventsSubject = (this.events as Subject<Event>);\n    return transitions.pipe(\n               filter(t => t.id !== 0),\n\n               // Extract URL\n               map(t =>\n                       ({...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)} as\n                        NavigationTransition)),\n\n               // Using switchMap so we cancel executing navigations when a new one comes in\n               switchMap(t => {\n                 let completed = false;\n                 let errored = false;\n                 return of(t).pipe(\n                     // Store the Navigation object\n                     tap(t => {\n                       this.currentNavigation = {\n                         id: t.id,\n                         initialUrl: t.currentRawUrl,\n                         extractedUrl: t.extractedUrl,\n                         trigger: t.source,\n                         extras: t.extras,\n                         previousNavigation: this.lastSuccessfulNavigation ?\n                             {...this.lastSuccessfulNavigation, previousNavigation: null} :\n                             null\n                       };\n                     }),\n                     switchMap(t => {\n                       const browserUrlTree = this.browserUrlTree.toString();\n                       const urlTransition = !this.navigated ||\n                           t.extractedUrl.toString() !== browserUrlTree ||\n                           // Navigations which succeed or ones which fail and are cleaned up\n                           // correctly should result in `browserUrlTree` and `currentUrlTree`\n                           // matching. If this is not the case, assume something went wrong and try\n                           // processing the URL again.\n                           browserUrlTree !== this.currentUrlTree.toString();\n                       const processCurrentUrl =\n                           (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n                           this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n\n                       if (processCurrentUrl) {\n                         // If the source of the navigation is from a browser event, the URL is\n                         // already updated. We already need to sync the internal state.\n                         if (isBrowserTriggeredNavigation(t.source)) {\n                           this.browserUrlTree = t.extractedUrl;\n                         }\n                         return of(t).pipe(\n                             // Fire NavigationStart event\n                             switchMap(t => {\n                               const transition = this.transitions.getValue();\n                               eventsSubject.next(new NavigationStart(\n                                   t.id, this.serializeUrl(t.extractedUrl), t.source,\n                                   t.restoredState));\n                               if (transition !== this.transitions.getValue()) {\n                                 return EMPTY;\n                               }\n\n                               // This delay is required to match old behavior that forced\n                               // navigation to always be async\n                               return Promise.resolve(t);\n                             }),\n\n                             // ApplyRedirects\n                             applyRedirects(\n                                 this.ngModule.injector, this.configLoader, this.urlSerializer,\n                                 this.config),\n\n                             // Update the currentNavigation\n                             tap(t => {\n                               this.currentNavigation = {\n                                 ...this.currentNavigation!,\n                                 finalUrl: t.urlAfterRedirects\n                               };\n                             }),\n\n                             // Recognize\n                             recognize(\n                                 this.rootComponentType, this.config,\n                                 (url) => this.serializeUrl(url), this.paramsInheritanceStrategy,\n                                 this.relativeLinkResolution),\n\n                             // Update URL if in `eager` update mode\n                             tap(t => {\n                               if (this.urlUpdateStrategy === 'eager') {\n                                 if (!t.extras.skipLocationChange) {\n                                   this.setBrowserUrl(t.urlAfterRedirects, t);\n                                   // TODO(atscott): The above line is incorrect. It sets the url to\n                                   // only the part that is handled by the router. It should merge\n                                   // that with the rawUrl so the url includes segments not handled\n                                   // by the router:\n                                   //  const rawUrl = this.urlHandlingStrategy.merge(\n                                   //      t.urlAfterRedirects, t.rawUrl);\n                                   //  this.setBrowserUrl(rawUrl, t);\n                                 }\n                                 this.browserUrlTree = t.urlAfterRedirects;\n                               }\n\n                               // Fire RoutesRecognized\n                               const routesRecognized = new RoutesRecognized(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               eventsSubject.next(routesRecognized);\n                             }));\n                       } else {\n                         const processPreviousUrl = urlTransition && this.rawUrlTree &&\n                             this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n                         /* When the current URL shouldn't be processed, but the previous one was,\n                          * we handle this \"error condition\" by navigating to the previously\n                          * successful URL, but leaving the URL intact.*/\n                         if (processPreviousUrl) {\n                           const {id, extractedUrl, source, restoredState, extras} = t;\n                           const navStart = new NavigationStart(\n                               id, this.serializeUrl(extractedUrl), source, restoredState);\n                           eventsSubject.next(navStart);\n                           const targetSnapshot =\n                               createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n                           return of({\n                             ...t,\n                             targetSnapshot,\n                             urlAfterRedirects: extractedUrl,\n                             extras: {...extras, skipLocationChange: false, replaceUrl: false},\n                           });\n                         } else {\n                           /* When neither the current or previous URL can be processed, do nothing\n                            * other than update router's internal reference to the current \"settled\"\n                            * URL. This way the next navigation will be coming from the current URL\n                            * in the browser.\n                            */\n                           this.rawUrlTree = t.rawUrl;\n                           this.browserUrlTree = t.urlAfterRedirects;\n                           t.resolve(null);\n                           return EMPTY;\n                         }\n                       }\n                     }),\n\n                     // Before Preactivation\n                     switchTap(t => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.beforePreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     // --- GUARDS ---\n                     tap(t => {\n                       const guardsStart = new GuardsCheckStart(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                       this.triggerEvent(guardsStart);\n                     }),\n\n                     map(t => ({\n                           ...t,\n                           guards: getAllRouteGuards(\n                               t.targetSnapshot!, t.currentSnapshot, this.rootContexts)\n                         })),\n\n                     checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n                     tap(t => {\n                       if (isUrlTree(t.guardsResult)) {\n                         const error: Error&{url?: UrlTree} = navigationCancelingError(\n                             `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n                         error.url = t.guardsResult;\n                         throw error;\n                       }\n\n                       const guardsEnd = new GuardsCheckEnd(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!,\n                           !!t.guardsResult);\n                       this.triggerEvent(guardsEnd);\n                     }),\n\n                     filter(t => {\n                       if (!t.guardsResult) {\n                         this.restoreHistory(t);\n                         this.cancelNavigationTransition(t, '');\n                         return false;\n                       }\n                       return true;\n                     }),\n\n                     // --- RESOLVE ---\n                     switchTap(t => {\n                       if (t.guards.canActivateChecks.length) {\n                         return of(t).pipe(\n                             tap(t => {\n                               const resolveStart = new ResolveStart(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveStart);\n                             }),\n                             switchMap(t => {\n                               let dataResolved = false;\n                               return of(t).pipe(\n                                   resolveData(\n                                       this.paramsInheritanceStrategy, this.ngModule.injector),\n                                   tap({\n                                     next: () => dataResolved = true,\n                                     complete: () => {\n                                       if (!dataResolved) {\n                                         this.restoreHistory(t);\n                                         this.cancelNavigationTransition(\n                                             t,\n                                             `At least one route resolver didn't emit any value.`);\n                                       }\n                                     }\n                                   }),\n                               );\n                             }),\n                             tap(t => {\n                               const resolveEnd = new ResolveEnd(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveEnd);\n                             }));\n                       }\n                       return undefined;\n                     }),\n\n                     // --- AFTER PREACTIVATION ---\n                     switchTap((t: NavigationTransition) => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.afterPreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     map((t: NavigationTransition) => {\n                       const targetRouterState = createRouterState(\n                           this.routeReuseStrategy, t.targetSnapshot!, t.currentRouterState);\n                       return ({...t, targetRouterState});\n                     }),\n\n                     /* Once here, we are about to activate syncronously. The assumption is this\n                        will succeed, and user code may read from the Router service. Therefore\n                        before activation, we need to update router properties storing the current\n                        URL and the RouterState, as well as updated the browser URL. All this should\n                        happen *before* activating. */\n                     tap((t: NavigationTransition) => {\n                       this.currentUrlTree = t.urlAfterRedirects;\n                       this.rawUrlTree =\n                           this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n\n                       (this as {routerState: RouterState}).routerState = t.targetRouterState!;\n\n                       if (this.urlUpdateStrategy === 'deferred') {\n                         if (!t.extras.skipLocationChange) {\n                           this.setBrowserUrl(this.rawUrlTree, t);\n                         }\n                         this.browserUrlTree = t.urlAfterRedirects;\n                       }\n                     }),\n\n                     activateRoutes(\n                         this.rootContexts, this.routeReuseStrategy,\n                         (evt: Event) => this.triggerEvent(evt)),\n\n                     tap({\n                       next() {\n                         completed = true;\n                       },\n                       complete() {\n                         completed = true;\n                       }\n                     }),\n                     finalize(() => {\n                       /* When the navigation stream finishes either through error or success, we\n                        * set the `completed` or `errored` flag. However, there are some situations\n                        * where we could get here without either of those being set. For instance, a\n                        * redirect during NavigationStart. Therefore, this is a catch-all to make\n                        * sure the NavigationCancel\n                        * event is fired when a navigation gets cancelled but not caught by other\n                        * means. */\n                       if (!completed && !errored) {\n                         const cancelationReason = `Navigation ID ${\n                             t.id} is not equal to the current navigation id ${this.navigationId}`;\n                         if (this.canceledNavigationResolution === 'replace') {\n                           // Must reset to current URL tree here to ensure history.state is set. On\n                           // a fresh page load, if a new navigation comes in before a successful\n                           // navigation completes, there will be nothing in\n                           // history.state.navigationId. This can cause sync problems with\n                           // AngularJS sync code which looks for a value here in order to determine\n                           // whether or not to handle a given popstate event or to leave it to the\n                           // Angular router.\n                           this.restoreHistory(t);\n                           this.cancelNavigationTransition(t, cancelationReason);\n                         } else {\n                           // We cannot trigger a `location.historyGo` if the\n                           // cancellation was due to a new navigation before the previous could\n                           // complete. This is because `location.historyGo` triggers a `popstate`\n                           // which would also trigger another navigation. Instead, treat this as a\n                           // redirect and do not reset the state.\n                           this.cancelNavigationTransition(t, cancelationReason);\n                           // TODO(atscott): The same problem happens here with a fresh page load\n                           // and a new navigation before that completes where we won't set a page\n                           // id.\n                         }\n                       }\n                       // Only clear current navigation if it is still set to the one that\n                       // finalized.\n                       if (this.currentNavigation?.id === t.id) {\n                         this.currentNavigation = null;\n                       }\n                     }),\n                     catchError((e) => {\n                       // TODO(atscott): The NavigationTransition `t` used here does not accurately\n                       // reflect the current state of the whole transition because some operations\n                       // return a new object rather than modifying the one in the outermost\n                       // `switchMap`.\n                       //  The fix can likely be to:\n                       //  1. Rename the outer `t` variable so it's not shadowed all the time and\n                       //  confusing\n                       //  2. Keep reassigning to the outer variable after each stage to ensure it\n                       //  gets updated. Or change the implementations to not return a copy.\n                       // Not changed yet because it affects existing code and would need to be\n                       // tested more thoroughly.\n                       errored = true;\n                       /* This error type is issued during Redirect, and is handled as a\n                        * cancellation rather than an error. */\n                       if (isNavigationCancelingError(e)) {\n                         const redirecting = isUrlTree(e.url);\n                         if (!redirecting) {\n                           // Set property only if we're not redirecting. If we landed on a page and\n                           // redirect to `/` route, the new navigation is going to see the `/`\n                           // isn't a change from the default currentUrlTree and won't navigate.\n                           // This is only applicable with initial navigation, so setting\n                           // `navigated` only when not redirecting resolves this scenario.\n                           this.navigated = true;\n                           this.restoreHistory(t, true);\n                         }\n                         const navCancel = new NavigationCancel(\n                             t.id, this.serializeUrl(t.extractedUrl), e.message);\n                         eventsSubject.next(navCancel);\n\n                         // When redirecting, we need to delay resolving the navigation\n                         // promise and push it to the redirect navigation\n                         if (!redirecting) {\n                           t.resolve(false);\n                         } else {\n                           // setTimeout is required so this navigation finishes with\n                           // the return EMPTY below. If it isn't allowed to finish\n                           // processing, there can be multiple navigations to the same\n                           // URL.\n                           setTimeout(() => {\n                             const mergedTree =\n                                 this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);\n                             const extras = {\n                               skipLocationChange: t.extras.skipLocationChange,\n                               // The URL is already updated at this point if we have 'eager' URL\n                               // updates or if the navigation was triggered by the browser (back\n                               // button, URL bar, etc). We want to replace that item in history if\n                               // the navigation is rejected.\n                               replaceUrl: this.urlUpdateStrategy === 'eager' ||\n                                   isBrowserTriggeredNavigation(t.source)\n                             };\n\n                             this.scheduleNavigation(\n                                 mergedTree, 'imperative', null, extras,\n                                 {resolve: t.resolve, reject: t.reject, promise: t.promise});\n                           }, 0);\n                         }\n\n                         /* All other errors should reset to the router's internal URL reference to\n                          * the pre-error state. */\n                       } else {\n                         this.restoreHistory(t, true);\n                         const navError =\n                             new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n                         eventsSubject.next(navError);\n                         try {\n                           t.resolve(this.errorHandler(e));\n                         } catch (ee) {\n                           t.reject(ee);\n                         }\n                       }\n                       return EMPTY;\n                     }));\n                 // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n               })) as any as Observable<NavigationTransition>;\n  }\n\n  /**\n   * @internal\n   * TODO: this should be removed once the constructor of the router made internal\n   */\n  resetRootComponentType(rootComponentType: Type<any>): void {\n    this.rootComponentType = rootComponentType;\n    // TODO: vsavkin router 4.0 should make the root component set to null\n    // this will simplify the lifecycle of the router.\n    this.routerState.root.component = this.rootComponentType;\n  }\n\n  private getTransition(): NavigationTransition {\n    const transition = this.transitions.value;\n    // TODO(atscott): This comment doesn't make it clear why this value needs to be set. In the case\n    // described below (where we don't handle previous or current url), the `browserUrlTree` is set\n    // to the `urlAfterRedirects` value. However, these values *are already the same* because of the\n    // line below. So it seems that we should be able to remove the line below and the line where\n    // `browserUrlTree` is updated when we aren't handling any part of the navigation url.\n    // Run TGP to confirm that this can be done.\n\n    // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n    // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n    // processing the previous URL.\n    transition.urlAfterRedirects = this.browserUrlTree;\n    return transition;\n  }\n\n  private setTransition(t: Partial<NavigationTransition>): void {\n    this.transitions.next({...this.getTransition(), ...t});\n  }\n\n  /**\n   * Sets up the location change listener and performs the initial navigation.\n   */\n  initialNavigation(): void {\n    this.setUpLocationChangeListener();\n    if (this.navigationId === 0) {\n      this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n    }\n  }\n\n  /**\n   * Sets up the location change listener. This listener detects navigations triggered from outside\n   * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n   * navigation so that the correct events, guards, etc. are triggered.\n   */\n  setUpLocationChangeListener(): void {\n    // Don't need to use Zone.wrap any more, because zone.js\n    // already patch onPopState, so location change callback will\n    // run into ngZone\n    if (!this.locationSubscription) {\n      this.locationSubscription = this.location.subscribe(event => {\n        const currentChange = this.extractLocationChangeInfoFromEvent(event);\n        // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n        // hybrid apps.\n        if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) {\n          setTimeout(() => {\n            const {source, state, urlTree} = currentChange;\n            const extras: NavigationExtras = {replaceUrl: true};\n            if (state) {\n              const stateCopy = {...state} as Partial<RestoredState>;\n              delete stateCopy.navigationId;\n              delete stateCopy.ɵrouterPageId;\n              if (Object.keys(stateCopy).length !== 0) {\n                extras.state = stateCopy;\n              }\n            }\n            this.scheduleNavigation(urlTree, source, state, extras);\n          }, 0);\n        }\n        this.lastLocationChangeInfo = currentChange;\n      });\n    }\n  }\n\n  /** Extracts router-related information from a `PopStateEvent`. */\n  private extractLocationChangeInfoFromEvent(change: PopStateEvent): LocationChangeInfo {\n    return {\n      source: change['type'] === 'popstate' ? 'popstate' : 'hashchange',\n      urlTree: this.parseUrl(change['url']!),\n      // Navigations coming from Angular router have a navigationId state\n      // property. When this exists, restore the state.\n      state: change.state?.navigationId ? change.state : null,\n      transitionId: this.getTransition().id\n    } as const;\n  }\n\n  /**\n   * Determines whether two events triggered by the Location subscription are due to the same\n   * navigation. The location subscription can fire two events (popstate and hashchange) for a\n   * single navigation. The second one should be ignored, that is, we should not schedule another\n   * navigation in the Router.\n   */\n  private shouldScheduleNavigation(previous: LocationChangeInfo|null, current: LocationChangeInfo):\n      boolean {\n    if (!previous) return true;\n\n    const sameDestination = current.urlTree.toString() === previous.urlTree.toString();\n    const eventsOccurredAtSameTime = current.transitionId === previous.transitionId;\n    if (!eventsOccurredAtSameTime || !sameDestination) {\n      return true;\n    }\n\n    if ((current.source === 'hashchange' && previous.source === 'popstate') ||\n        (current.source === 'popstate' && previous.source === 'hashchange')) {\n      return false;\n    }\n\n    return true;\n  }\n\n  /** The current URL. */\n  get url(): string {\n    return this.serializeUrl(this.currentUrlTree);\n  }\n\n  /**\n   * Returns the current `Navigation` object when the router is navigating,\n   * and `null` when idle.\n   */\n  getCurrentNavigation(): Navigation|null {\n    return this.currentNavigation;\n  }\n\n  /** @internal */\n  triggerEvent(event: Event): void {\n    (this.events as Subject<Event>).next(event);\n  }\n\n  /**\n   * Resets the route configuration used for navigation and generating links.\n   *\n   * @param config The route array for the new configuration.\n   *\n   * @usageNotes\n   *\n   * ```\n   * router.resetConfig([\n   *  { path: 'team/:id', component: TeamCmp, children: [\n   *    { path: 'simple', component: SimpleCmp },\n   *    { path: 'user/:name', component: UserCmp }\n   *  ]}\n   * ]);\n   * ```\n   */\n  resetConfig(config: Routes): void {\n    validateConfig(config);\n    this.config = config.map(standardizeConfig);\n    this.navigated = false;\n    this.lastSuccessfulId = -1;\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.dispose();\n  }\n\n  /** Disposes of the router. */\n  dispose(): void {\n    this.transitions.complete();\n    if (this.locationSubscription) {\n      this.locationSubscription.unsubscribe();\n      this.locationSubscription = undefined;\n    }\n    this.disposed = true;\n  }\n\n  /**\n   * Appends URL segments to the current URL tree to create a new URL tree.\n   *\n   * @param commands An array of URL fragments with which to construct the new URL tree.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\n   * property of the options object, if supplied.\n   * @param navigationExtras Options that control the navigation strategy.\n   * @returns The new URL tree.\n   *\n   * @usageNotes\n   *\n   * ```\n   * // create /team/33/user/11\n   * router.createUrlTree(['/team', 33, 'user', 11]);\n   *\n   * // create /team/33;expand=true/user/11\n   * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n   *\n   * // you can collapse static segments like this (this works only with the first passed-in value):\n   * router.createUrlTree(['/team/33/user', userId]);\n   *\n   * // If the first segment can contain slashes, and you do not want the router to split it,\n   * // you can do the following:\n   * router.createUrlTree([{segmentPath: '/one/two'}]);\n   *\n   * // create /team/33/(user/11//right:chat)\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n   *\n   * // remove the right secondary node\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n   *\n   * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n   *\n   * // navigate to /team/33/user/11/details\n   * router.createUrlTree(['details'], {relativeTo: route});\n   *\n   * // navigate to /team/33/user/22\n   * router.createUrlTree(['../22'], {relativeTo: route});\n   *\n   * // navigate to /team/44/user/22\n   * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n   *\n   * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n   * tree should be created relative to the root.\n   * ```\n   */\n  createUrlTree(commands: any[], navigationExtras: UrlCreationOptions = {}): UrlTree {\n    const {relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment} =\n        navigationExtras;\n    const a = relativeTo || this.routerState.root;\n    const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n    let q: Params|null = null;\n    switch (queryParamsHandling) {\n      case 'merge':\n        q = {...this.currentUrlTree.queryParams, ...queryParams};\n        break;\n      case 'preserve':\n        q = this.currentUrlTree.queryParams;\n        break;\n      default:\n        q = queryParams || null;\n    }\n    if (q !== null) {\n      q = this.removeEmptyProps(q);\n    }\n    return createUrlTree(a, this.currentUrlTree, commands, q, f ?? null);\n  }\n\n  /**\n   * Navigates to a view using an absolute route path.\n   *\n   * @param url An absolute path for a defined route. The function does not apply any delta to the\n   *     current URL.\n   * @param extras An object containing properties that modify the navigation strategy.\n   *\n   * @returns A Promise that resolves to 'true' when navigation succeeds,\n   * to 'false' when navigation fails, or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to an absolute path.\n   *\n   * ```\n   * router.navigateByUrl(\"/team/33/user/11\");\n   *\n   * // Navigate without updating the URL\n   * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigateByUrl(url: string|UrlTree, extras: NavigationBehaviorOptions = {\n    skipLocationChange: false\n  }): Promise<boolean> {\n    if (typeof ngDevMode === 'undefined' ||\n        ngDevMode && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n      this.console.warn(\n          `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n    }\n\n    const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n    const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n    return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n  }\n\n  /**\n   * Navigate based on the provided array of commands and a starting point.\n   * If no starting route is provided, the navigation is absolute.\n   *\n   * @param commands An array of URL fragments with which to construct the target URL.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\n   * of the options object, if supplied.\n   * @param extras An options object that determines how the URL should be constructed or\n   *     interpreted.\n   *\n   * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\n   *     fails,\n   * or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to a dynamic route path relative to the current URL.\n   *\n   * ```\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n   *\n   * // Navigate without updating the URL, overriding the default behavior\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    validateCommands(commands);\n    return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n  }\n\n  /** Serializes a `UrlTree` into a string */\n  serializeUrl(url: UrlTree): string {\n    return this.urlSerializer.serialize(url);\n  }\n\n  /** Parses a string into a `UrlTree` */\n  parseUrl(url: string): UrlTree {\n    let urlTree: UrlTree;\n    try {\n      urlTree = this.urlSerializer.parse(url);\n    } catch (e) {\n      urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n    }\n    return urlTree;\n  }\n\n  /**\n   * Returns whether the url is activated.\n   *\n   * @deprecated\n   * Use `IsActiveMatchOptions` instead.\n   *\n   * - The equivalent `IsActiveMatchOptions` for `true` is\n   * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.\n   * - The equivalent for `false` is\n   * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.\n   */\n  isActive(url: string|UrlTree, exact: boolean): boolean;\n  /**\n   * Returns whether the url is activated.\n   */\n  isActive(url: string|UrlTree, matchOptions: IsActiveMatchOptions): boolean;\n  /** @internal */\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean;\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean {\n    let options: IsActiveMatchOptions;\n    if (matchOptions === true) {\n      options = {...exactMatchOptions};\n    } else if (matchOptions === false) {\n      options = {...subsetMatchOptions};\n    } else {\n      options = matchOptions;\n    }\n    if (isUrlTree(url)) {\n      return containsTree(this.currentUrlTree, url, options);\n    }\n\n    const urlTree = this.parseUrl(url);\n    return containsTree(this.currentUrlTree, urlTree, options);\n  }\n\n  private removeEmptyProps(params: Params): Params {\n    return Object.keys(params).reduce((result: Params, key: string) => {\n      const value: any = params[key];\n      if (value !== null && value !== undefined) {\n        result[key] = value;\n      }\n      return result;\n    }, {});\n  }\n\n  private processNavigations(): void {\n    this.navigations.subscribe(\n        t => {\n          this.navigated = true;\n          this.lastSuccessfulId = t.id;\n          this.currentPageId = t.targetPageId;\n          (this.events as Subject<Event>)\n              .next(new NavigationEnd(\n                  t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n          this.lastSuccessfulNavigation = this.currentNavigation;\n          t.resolve(true);\n        },\n        e => {\n          this.console.warn(`Unhandled Navigation Error: ${e}`);\n        });\n  }\n\n  private scheduleNavigation(\n      rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n      extras: NavigationExtras,\n      priorPromise?: {resolve: any, reject: any, promise: Promise<boolean>}): Promise<boolean> {\n    if (this.disposed) {\n      return Promise.resolve(false);\n    }\n\n    // * Imperative navigations (router.navigate) might trigger additional navigations to the same\n    //   URL via a popstate event and the locationChangeListener. We should skip these duplicate\n    //   navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router\n    //   states.\n    // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If\n    //   the user follows that with a navigation using the back/forward button or manual URL change,\n    //   the destination may be the same as the previous imperative attempt. We should not skip\n    //   these navigations because it's a separate case from the one above -- it's not a duplicate\n    //   navigation.\n    const lastNavigation = this.getTransition();\n    // We don't want to skip duplicate successful navs if they're imperative because\n    // onSameUrlNavigation could be 'reload' (so the duplicate is intended).\n    const browserNavPrecededByRouterNav = isBrowserTriggeredNavigation(source) && lastNavigation &&\n        !isBrowserTriggeredNavigation(lastNavigation.source);\n    const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id;\n    // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison.\n    // However, if it failed, we should compare to the final result (urlAfterRedirects).\n    const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ?\n        lastNavigation.rawUrl :\n        lastNavigation.urlAfterRedirects;\n    const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();\n    if (browserNavPrecededByRouterNav && duplicateNav) {\n      return Promise.resolve(true);  // return value is not used\n    }\n\n    let resolve: any;\n    let reject: any;\n    let promise: Promise<boolean>;\n    if (priorPromise) {\n      resolve = priorPromise.resolve;\n      reject = priorPromise.reject;\n      promise = priorPromise.promise;\n\n    } else {\n      promise = new Promise<boolean>((res, rej) => {\n        resolve = res;\n        reject = rej;\n      });\n    }\n\n    const id = ++this.navigationId;\n    let targetPageId: number;\n    if (this.canceledNavigationResolution === 'computed') {\n      const isInitialPage = this.currentPageId === 0;\n      if (isInitialPage) {\n        restoredState = this.location.getState() as RestoredState | null;\n      }\n      // If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of\n      // `ɵrouterPageId`. This is the case for something like a page refresh where we assign the\n      // target id to the previously set value for that page.\n      if (restoredState && restoredState.ɵrouterPageId) {\n        targetPageId = restoredState.ɵrouterPageId;\n      } else {\n        // If we're replacing the URL or doing a silent navigation, we do not want to increment the\n        // page id because we aren't pushing a new entry to history.\n        if (extras.replaceUrl || extras.skipLocationChange) {\n          targetPageId = this.browserPageId ?? 0;\n        } else {\n          targetPageId = (this.browserPageId ?? 0) + 1;\n        }\n      }\n    } else {\n      // This is unused when `canceledNavigationResolution` is not computed.\n      targetPageId = 0;\n    }\n\n    this.setTransition({\n      id,\n      targetPageId,\n      source,\n      restoredState,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.rawUrlTree,\n      rawUrl,\n      extras,\n      resolve,\n      reject,\n      promise,\n      currentSnapshot: this.routerState.snapshot,\n      currentRouterState: this.routerState\n    });\n\n    // Make sure that the error is propagated even though `processNavigations` catch\n    // handler does not rethrow\n    return promise.catch((e: any) => {\n      return Promise.reject(e);\n    });\n  }\n\n  private setBrowserUrl(url: UrlTree, t: NavigationTransition) {\n    const path = this.urlSerializer.serialize(url);\n    const state = {...t.extras.state, ...this.generateNgRouterState(t.id, t.targetPageId)};\n    if (this.location.isCurrentPathEqualTo(path) || !!t.extras.replaceUrl) {\n      this.location.replaceState(path, '', state);\n    } else {\n      this.location.go(path, '', state);\n    }\n  }\n\n  /**\n   * Performs the necessary rollback action to restore the browser URL to the\n   * state before the transition.\n   */\n  private restoreHistory(t: NavigationTransition, restoringFromCaughtError = false) {\n    if (this.canceledNavigationResolution === 'computed') {\n      const targetPagePosition = this.currentPageId - t.targetPageId;\n      // The navigator change the location before triggered the browser event,\n      // so we need to go back to the current url if the navigation is canceled.\n      // Also, when navigation gets cancelled while using url update strategy eager, then we need to\n      // go back. Because, when `urlUpdateSrategy` is `eager`; `setBrowserUrl` method is called\n      // before any verification.\n      const browserUrlUpdateOccurred =\n          (t.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n           this.currentUrlTree === this.currentNavigation?.finalUrl);\n      if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n        this.location.historyGo(targetPagePosition);\n      } else if (\n          this.currentUrlTree === this.currentNavigation?.finalUrl && targetPagePosition === 0) {\n        // We got to the activation stage (where currentUrlTree is set to the navigation's\n        // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n        // We still need to reset the router state back to what it was when the navigation started.\n        this.resetState(t);\n        // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.\n        // Investigate if this can be done by running TGP.\n        this.browserUrlTree = t.currentUrlTree;\n        this.resetUrlToCurrentUrlTree();\n      } else {\n        // The browser URL and router state was not updated before the navigation cancelled so\n        // there's no restoration needed.\n      }\n    } else if (this.canceledNavigationResolution === 'replace') {\n      // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n      // for `deferred` navigations that haven't change the internal state yet because guards\n      // reject. For 'eager' navigations, it seems like we also really should reset the state\n      // because the navigation was cancelled. Investigate if this can be done by running TGP.\n      if (restoringFromCaughtError) {\n        this.resetState(t);\n      }\n      this.resetUrlToCurrentUrlTree();\n    }\n  }\n\n  private resetState(t: NavigationTransition): void {\n    (this as {routerState: RouterState}).routerState = t.currentRouterState;\n    this.currentUrlTree = t.currentUrlTree;\n    this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n  }\n\n  private resetUrlToCurrentUrlTree(): void {\n    this.location.replaceState(\n        this.urlSerializer.serialize(this.rawUrlTree), '',\n        this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n  }\n\n  private cancelNavigationTransition(t: NavigationTransition, reason: string) {\n    const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), reason);\n    this.triggerEvent(navCancel);\n    t.resolve(false);\n  }\n\n  private generateNgRouterState(navigationId: number, routerPageId?: number) {\n    if (this.canceledNavigationResolution === 'computed') {\n      return {navigationId, ɵrouterPageId: routerPageId};\n    }\n    return {navigationId};\n  }\n}\n\nfunction validateCommands(commands: string[]): void {\n  for (let i = 0; i < commands.length; i++) {\n    const cmd = commands[i];\n    if (cmd == null) {\n      throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n    }\n  }\n}\n\nfunction isBrowserTriggeredNavigation(source: 'imperative'|'popstate'|'hashchange') {\n  return source !== 'imperative';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {Params} from '../shared';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segements.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink implements OnChanges {\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private preserve!: boolean;\n\n  /** @internal */\n  onChanges = new Subject<RouterLink>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n    if (tabIndex == null) {\n      renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges) {\n    // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n    // to the RouterLinks it's tracking.\n    this.onChanges.next(this);\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  @HostListener('click')\n  onClick(): boolean {\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state,\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return true;\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @HostBinding('attr.target') @Input() target!: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private subscription: Subscription;\n  // TODO(issue/24571): remove '!'.\n  private preserve!: boolean;\n\n  // the url displayed on the anchor element.\n  // TODO(issue/24571): remove '!'.\n  @HostBinding() href!: string;\n\n  /** @internal */\n  onChanges = new Subject<RouterLinkWithHref>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      private locationStrategy: LocationStrategy) {\n    this.subscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.updateTargetUrlAndHref();\n      }\n    });\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): any {\n    this.updateTargetUrlAndHref();\n    this.onChanges.next(this);\n  }\n  /** @nodoc */\n  ngOnDestroy(): any {\n    this.subscription.unsubscribe();\n  }\n\n  /** @nodoc */\n  @HostListener(\n      'click',\n      ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'])\n  onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean):\n      boolean {\n    if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n      return true;\n    }\n\n    if (typeof this.target === 'string' && this.target != '_self') {\n      return true;\n    }\n\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return false;\n  }\n\n  private updateTargetUrlAndHref(): void {\n    this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\nfunction attrBoolValue(s: any): boolean {\n  return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, Optional, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {from, of, Subscription} from 'rxjs';\nimport {mergeAll} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {IsActiveMatchOptions} from '../url_tree';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLinkActive]',\n  exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n  @ContentChildren(RouterLink, {descendants: true}) links!: QueryList<RouterLink>;\n  @ContentChildren(RouterLinkWithHref, {descendants: true})\n  linksWithHrefs!: QueryList<RouterLinkWithHref>;\n\n  private classes: string[] = [];\n  private routerEventsSubscription: Subscription;\n  private linkInputChangesSubscription?: Subscription;\n  public readonly isActive: boolean = false;\n\n  /**\n   * Options to configure how to determine if the router link is active.\n   *\n   * These options are passed to the `Router.isActive()` function.\n   *\n   * @see Router.isActive\n   */\n  @Input() routerLinkActiveOptions: {exact: boolean}|IsActiveMatchOptions = {exact: false};\n\n\n  constructor(\n      private router: Router, private element: ElementRef, private renderer: Renderer2,\n      private readonly cdr: ChangeDetectorRef, @Optional() private link?: RouterLink,\n      @Optional() private linkWithHref?: RouterLinkWithHref) {\n    this.routerEventsSubscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.update();\n      }\n    });\n  }\n\n  /** @nodoc */\n  ngAfterContentInit(): void {\n    // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n    of(this.links.changes, this.linksWithHrefs.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n      this.update();\n      this.subscribeToEachLinkOnChanges();\n    });\n  }\n\n  private subscribeToEachLinkOnChanges() {\n    this.linkInputChangesSubscription?.unsubscribe();\n    const allLinkChanges =\n        [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref]\n            .filter((link): link is RouterLink|RouterLinkWithHref => !!link)\n            .map(link => link.onChanges);\n    this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n      if (this.isActive !== this.isLinkActive(this.router)(link)) {\n        this.update();\n      }\n    });\n  }\n\n  @Input()\n  set routerLinkActive(data: string[]|string) {\n    const classes = Array.isArray(data) ? data : data.split(' ');\n    this.classes = classes.filter(c => !!c);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    this.update();\n  }\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.routerEventsSubscription.unsubscribe();\n    this.linkInputChangesSubscription?.unsubscribe();\n  }\n\n  private update(): void {\n    if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n    Promise.resolve().then(() => {\n      const hasActiveLinks = this.hasActiveLinks();\n      if (this.isActive !== hasActiveLinks) {\n        (this as any).isActive = hasActiveLinks;\n        this.cdr.markForCheck();\n        this.classes.forEach((c) => {\n          if (hasActiveLinks) {\n            this.renderer.addClass(this.element.nativeElement, c);\n          } else {\n            this.renderer.removeClass(this.element.nativeElement, c);\n          }\n        });\n      }\n    });\n  }\n\n  private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n    const options: boolean|IsActiveMatchOptions =\n        isActiveMatchOptions(this.routerLinkActiveOptions) ?\n        this.routerLinkActiveOptions :\n        // While the types should disallow `undefined` here, it's possible without strict inputs\n        (this.routerLinkActiveOptions.exact || false);\n    return (link: RouterLink|RouterLinkWithHref) => router.isActive(link.urlTree, options);\n  }\n\n  private hasActiveLinks(): boolean {\n    const isActiveCheckFn = this.isLinkActive(this.router);\n    return this.link && isActiveCheckFn(this.link) ||\n        this.linkWithHref && isActiveCheckFn(this.linkWithHref) ||\n        this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);\n  }\n}\n\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options: {exact: boolean}|\n                              IsActiveMatchOptions): options is IsActiveMatchOptions {\n  return !!(options as IsActiveMatchOptions).paths;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef,} from '@angular/core';\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * An interface that defines the contract for developing a component outlet for the `Router`.\n *\n * An outlet acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * A router outlet should register itself with the `Router` via\n * `ChildrenOutletContexts#onChildOutletCreated` and unregister with\n * `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,\n * it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.\n *\n * @see `ChildrenOutletContexts`\n * @publicApi\n */\nexport interface RouterOutletContract {\n  /**\n   * Whether the given outlet is activated.\n   *\n   * An outlet is considered \"activated\" if it has an active component.\n   */\n  isActivated: boolean;\n\n  /** The instance of the activated component or `null` if the outlet is not activated. */\n  component: Object|null;\n\n  /**\n   * The `Data` of the `ActivatedRoute` snapshot.\n   */\n  activatedRouteData: Data;\n\n  /**\n   * The `ActivatedRoute` for the outlet or `null` if the outlet is not activated.\n   */\n  activatedRoute: ActivatedRoute|null;\n\n  /**\n   * Called by the `Router` when the outlet should activate (create a component).\n   */\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null): void;\n\n  /**\n   * A request to destroy the currently activated component.\n   *\n   * When a `RouteReuseStrategy` indicates that an `ActivatedRoute` should be removed but stored for\n   * later re-use rather than destroyed, the `Router` will call `detach` instead.\n   */\n  deactivate(): void;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree.\n   *\n   * This is similar to `deactivate`, but the activated component should _not_ be destroyed.\n   * Instead, it is returned so that it can be reattached later via the `attach` method.\n   */\n  detach(): ComponentRef<unknown>;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree.\n   */\n  attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;\n\n  /**\n   * Emits an activate event when a new component is instantiated\n   **/\n  activateEvents?: EventEmitter<unknown>;\n\n  /**\n   * Emits a deactivate event when a component is destroyed.\n   */\n  deactivateEvents?: EventEmitter<unknown>;\n}\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {\n  private activated: ComponentRef<any>|null = null;\n  private _activatedRoute: ActivatedRoute|null = null;\n  private name: string;\n\n  @Output('activate') activateEvents = new EventEmitter<any>();\n  @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n  constructor(\n      private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n      private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n      private changeDetector: ChangeDetectorRef) {\n    this.name = name || PRIMARY_OUTLET;\n    parentContexts.onChildOutletCreated(this.name, this);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.parentContexts.onChildOutletDestroyed(this.name);\n  }\n\n  /** @nodoc */\n  ngOnInit(): void {\n    if (!this.activated) {\n      // If the outlet was not instantiated at the time the route got activated we need to populate\n      // the outlet when it is initialized (ie inside a NgIf)\n      const context = this.parentContexts.getContext(this.name);\n      if (context && context.route) {\n        if (context.attachRef) {\n          // `attachRef` is populated when there is an existing component to mount\n          this.attach(context.attachRef, context.route);\n        } else {\n          // otherwise the component defined in the configuration is created\n          this.activateWith(context.route, context.resolver || null);\n        }\n      }\n    }\n  }\n\n  get isActivated(): boolean {\n    return !!this.activated;\n  }\n\n  /**\n   * @returns The currently activated component instance.\n   * @throws An error if the outlet is not activated.\n   */\n  get component(): Object {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this.activated.instance;\n  }\n\n  get activatedRoute(): ActivatedRoute {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this._activatedRoute as ActivatedRoute;\n  }\n\n  get activatedRouteData(): Data {\n    if (this._activatedRoute) {\n      return this._activatedRoute.snapshot.data;\n    }\n    return {};\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree\n   */\n  detach(): ComponentRef<any> {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    this.location.detach();\n    const cmp = this.activated;\n    this.activated = null;\n    this._activatedRoute = null;\n    return cmp;\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n   */\n  attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n    this.activated = ref;\n    this._activatedRoute = activatedRoute;\n    this.location.insert(ref.hostView);\n  }\n\n  deactivate(): void {\n    if (this.activated) {\n      const c = this.component;\n      this.activated.destroy();\n      this.activated = null;\n      this._activatedRoute = null;\n      this.deactivateEvents.emit(c);\n    }\n  }\n\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n    if (this.isActivated) {\n      throw new Error('Cannot activate an already activated outlet');\n    }\n    this._activatedRoute = activatedRoute;\n    const snapshot = activatedRoute._futureSnapshot;\n    const component = <any>snapshot.routeConfig!.component;\n    resolver = resolver || this.resolver;\n    const factory = resolver.resolveComponentFactory(component);\n    const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n    const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n    this.activated = this.location.createComponent(factory, this.location.length, injector);\n    // Calling `markForCheck` to make sure we will run the change detection when the\n    // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n    this.changeDetector.markForCheck();\n    this.activateEvents.emit(this.activated.instance);\n  }\n}\n\nclass OutletInjector implements Injector {\n  constructor(\n      private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n      private parent: Injector) {}\n\n  get(token: any, notFoundValue?: any): any {\n    if (token === ActivatedRoute) {\n      return this.route;\n    }\n\n    if (token === ChildrenOutletContexts) {\n      return this.childContexts;\n    }\n\n    return this.parent.get(token, notFoundValue);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {from, Observable, of, Subscription} from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n  abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return fn().pipe(catchError(() => of(null)));\n  }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return of(null);\n  }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n  private loader: RouterConfigLoader;\n  private subscription?: Subscription;\n\n  constructor(\n      private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n      private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n    const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n    const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n  }\n\n  setUpPreloading(): void {\n    this.subscription =\n        this.router.events\n            .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n            .subscribe(() => {});\n  }\n\n  preload(): Observable<any> {\n    const ngModule = this.injector.get(NgModuleRef);\n    return this.processRoutes(ngModule, this.router.config);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this.subscription) {\n      this.subscription.unsubscribe();\n    }\n  }\n\n  private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n    const res: Observable<any>[] = [];\n    for (const route of routes) {\n      // we already have the config loaded, just recurse\n      if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n        const childConfig = route._loadedConfig;\n        res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n        // no config loaded, fetch the config\n      } else if (route.loadChildren && !route.canLoad) {\n        res.push(this.preloadConfig(ngModule, route));\n\n        // recurse into children\n      } else if (route.children) {\n        res.push(this.processRoutes(ngModule, route.children));\n      }\n    }\n    return from(res).pipe(mergeAll(), map((_) => void 0));\n  }\n\n  private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n    return this.preloadingStrategy.preload(route, () => {\n      const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                            this.loader.load(ngModule.injector, route);\n      return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n        route._loadedConfig = config;\n        return this.processRoutes(config.module, config.routes);\n      }));\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {Injectable, OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\n@Injectable()\nexport class RouterScroller implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  private routerEventsSubscription!: Unsubscribable;\n  // TODO(issue/24571): remove '!'.\n  private scrollEventsSubscription!: Unsubscribable;\n\n  private lastId = 0;\n  private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n  private restoredId = 0;\n  private store: {[key: string]: [number, number]} = {};\n\n  constructor(\n      private router: Router,\n      /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n        scrollPositionRestoration?: 'disabled'|'enabled'|'top',\n        anchorScrolling?: 'disabled'|'enabled'\n      } = {}) {\n    // Default both options to 'disabled'\n    options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n    options.anchorScrolling = options.anchorScrolling || 'disabled';\n  }\n\n  init(): void {\n    // we want to disable the automatic scrolling because having two places\n    // responsible for scrolling results race conditions, especially given\n    // that browser don't implement this behavior consistently\n    if (this.options.scrollPositionRestoration !== 'disabled') {\n      this.viewportScroller.setHistoryScrollRestoration('manual');\n    }\n    this.routerEventsSubscription = this.createScrollEvents();\n    this.scrollEventsSubscription = this.consumeScrollEvents();\n  }\n\n  private createScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (e instanceof NavigationStart) {\n        // store the scroll position of the current stable navigations.\n        this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n        this.lastSource = e.navigationTrigger;\n        this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n      } else if (e instanceof NavigationEnd) {\n        this.lastId = e.id;\n        this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n      }\n    });\n  }\n\n  private consumeScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (!(e instanceof Scroll)) return;\n      // a popstate event. The pop state event will always ignore anchor scrolling.\n      if (e.position) {\n        if (this.options.scrollPositionRestoration === 'top') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        } else if (this.options.scrollPositionRestoration === 'enabled') {\n          this.viewportScroller.scrollToPosition(e.position);\n        }\n        // imperative navigation \"forward\"\n      } else {\n        if (e.anchor && this.options.anchorScrolling === 'enabled') {\n          this.viewportScroller.scrollToAnchor(e.anchor);\n        } else if (this.options.scrollPositionRestoration !== 'disabled') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        }\n      }\n    });\n  }\n\n  private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n    this.router.triggerEvent(new Scroll(\n        routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n  }\n\n  /** @nodoc */\n  ngOnDestroy() {\n    if (this.routerEventsSubscription) {\n      this.routerEventsSubscription.unsubscribe();\n    }\n    if (this.scrollEventsSubscription) {\n      this.scrollEventsSubscription.unsubscribe();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, Location, LOCATION_INITIALIZED, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, OnDestroy, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {of, Subject} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {Event} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES =\n    [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n  Location,\n  {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n  {\n    provide: Router,\n    useFactory: setupRouter,\n    deps: [\n      UrlSerializer, ChildrenOutletContexts, Location, Injector, NgModuleFactoryLoader, Compiler,\n      ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n      [RouteReuseStrategy, new Optional()]\n    ]\n  },\n  ChildrenOutletContexts,\n  {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n  {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n  RouterPreloader,\n  NoPreloading,\n  PreloadAllModules,\n  {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n  return new NgProbeToken('Router', Router);\n}\n\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/router) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\n@NgModule({\n  declarations: ROUTER_DIRECTIVES,\n  exports: ROUTER_DIRECTIVES,\n  entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n  // Note: We are injecting the Router so it gets created eagerly...\n  constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n  /**\n   * Creates and configures a module with all the router providers and directives.\n   * Optionally sets up an application listener to perform an initial navigation.\n   *\n   * When registering the NgModule at the root, import as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forRoot(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the application.\n   * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n   * @return The new `NgModule`.\n   *\n   */\n  static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [\n        ROUTER_PROVIDERS,\n        provideRoutes(routes),\n        {\n          provide: ROUTER_FORROOT_GUARD,\n          useFactory: provideForRootGuard,\n          deps: [[Router, new Optional(), new SkipSelf()]]\n        },\n        {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n        {\n          provide: LocationStrategy,\n          useFactory: provideLocationStrategy,\n          deps:\n              [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]\n        },\n        {\n          provide: RouterScroller,\n          useFactory: createRouterScroller,\n          deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n        },\n        {\n          provide: PreloadingStrategy,\n          useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n                                                             NoPreloading\n        },\n        {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n        provideRouterInitializer(),\n      ],\n    };\n  }\n\n  /**\n   * Creates a module with all the router directives and a provider registering routes,\n   * without creating a new Router service.\n   * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forChild(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n   * @return The new NgModule.\n   *\n   */\n  static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n    return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n  }\n}\n\nexport function createRouterScroller(\n    router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n  if (config.scrollOffset) {\n    viewportScroller.setOffset(config.scrollOffset);\n  }\n  return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n    platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n  return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n                           new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n  if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n    throw new Error(\n        `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n  }\n  return 'guarded';\n}\n\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n *   imports: [RouterModule.forChild(ROUTES)],\n *   providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n  return [\n    {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n    {provide: ROUTES, multi: true, useValue: routes},\n  ];\n}\n\n/**\n * Allowed values in an `ExtraOptions` object that configure\n * when the router performs the initial navigation operation.\n *\n * * 'enabledNonBlocking' - (default) The initial navigation starts after the\n * root component has been created. The bootstrap is not blocked on the completion of the initial\n * navigation.\n * * 'enabledBlocking' - The initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete. This value is required\n * for [server-side rendering](guide/universal) to work.\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\n * the root component gets created. Use if there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic.\n *\n * The following values have been [deprecated](guide/releases#deprecation-practices) since v11,\n * and should not be used for new applications.\n *\n * * 'enabled' - This option is 1:1 replaceable with `enabledBlocking`.\n *\n * @see `forRoot()`\n *\n * @publicApi\n */\nexport type InitialNavigation = 'disabled'|'enabled'|'enabledBlocking'|'enabledNonBlocking';\n\n/**\n * A set of configuration options for a router module, provided in the\n * `forRoot()` method.\n *\n * @see `forRoot()`\n *\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n  /**\n   * When true, log all internal navigation events to the console.\n   * Use for debugging.\n   */\n  enableTracing?: boolean;\n\n  /**\n   * When true, enable the location strategy that uses the URL fragment\n   * instead of the history API.\n   */\n  useHash?: boolean;\n\n  /**\n   * One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.\n   * When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root\n   * component is created. The bootstrap is blocked until the initial navigation is complete. This\n   * value is required for [server-side rendering](guide/universal) to work. When set to\n   * `enabledNonBlocking`, the initial navigation starts after the root component has been created.\n   * The bootstrap is not blocked on the completion of the initial navigation. When set to\n   * `disabled`, the initial navigation is not performed. The location listener is set up before the\n   * root component gets created. Use if there is a reason to have more control over when the router\n   * starts its initial navigation due to some complex initialization logic.\n   */\n  initialNavigation?: InitialNavigation;\n\n  /**\n   * A custom error handler for failed navigations.\n   * If the handler returns a value, the navigation Promise is resolved with this value.\n   * If the handler throws an exception, the navigation Promise is rejected with the exception.\n   *\n   */\n  errorHandler?: ErrorHandler;\n\n  /**\n   * Configures a preloading strategy.\n   * One of `PreloadAllModules` or `NoPreloading` (the default).\n   */\n  preloadingStrategy?: any;\n\n  /**\n   * Define what the router should do if it receives a navigation request to the current URL.\n   * Default is `ignore`, which causes the router ignores the navigation.\n   * This can disable features such as a \"refresh\" button.\n   * Use this option to configure the behavior when navigating to the\n   * current URL. Default is 'ignore'.\n   */\n  onSameUrlNavigation?: 'reload'|'ignore';\n\n  /**\n   * Configures if the scroll position needs to be restored when navigating back.\n   *\n   * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\n   * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\n   * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\n   * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\n   * navigation). This option will be the default in the future.\n   *\n   * You can implement custom scroll restoration behavior by adapting the enabled behavior as\n   * in the following example.\n   *\n   * ```typescript\n   * class AppModule {\n   *   constructor(router: Router, viewportScroller: ViewportScroller) {\n   *     router.events.pipe(\n   *       filter((e: Event): e is Scroll => e instanceof Scroll)\n   *     ).subscribe(e => {\n   *       if (e.position) {\n   *         // backward navigation\n   *         viewportScroller.scrollToPosition(e.position);\n   *       } else if (e.anchor) {\n   *         // anchor navigation\n   *         viewportScroller.scrollToAnchor(e.anchor);\n   *       } else {\n   *         // forward navigation\n   *         viewportScroller.scrollToPosition([0, 0]);\n   *       }\n   *     });\n   *   }\n   * }\n   * ```\n   */\n  scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n  /**\n   * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\n   * Anchor scrolling is disabled by default.\n   *\n   * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n   * that we stored or scroll to the top.\n   */\n  anchorScrolling?: 'disabled'|'enabled';\n\n  /**\n   * Configures the scroll offset the router will use when scrolling to an element.\n   *\n   * When given a tuple with x and y position value,\n   * the router uses that offset each time it scrolls.\n   * When given a function, the router invokes the function every time\n   * it restores scroll position.\n   */\n  scrollOffset?: [number, number]|(() => [number, number]);\n\n  /**\n   * Defines how the router merges parameters, data, and resolved data from parent to child\n   * routes. By default ('emptyOnly'), inherits parent parameters only for\n   * path-less or component-less routes.\n   *\n   * Set to 'always' to enable unconditional inheritance of parent parameters.\n   *\n   * Note that when dealing with matrix parameters, \"parent\" refers to the parent `Route`\n   * config which does not necessarily mean the \"URL segment to the left\". When the `Route` `path`\n   * contains multiple segments, the matrix parameters must appear on the last segment. For example,\n   * matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not\n   * `a;foo=bar/b`.\n   *\n   */\n  paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n  /**\n   * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\n   * invalid character sequences.\n   * The default implementation is to redirect to the root URL, dropping\n   * any path or parameter information. The function takes three parameters:\n   *\n   * - `'URIError'` - Error thrown when parsing a bad URL.\n   * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n   * - `'url'` -  The malformed URL that caused the URIError\n   * */\n  malformedUriErrorHandler?:\n      (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n  /**\n   * Defines when the router updates the browser URL. By default ('deferred'),\n   * update after successful navigation.\n   * Set to 'eager' if prefer to update the URL at the beginning of navigation.\n   * Updating the URL early allows you to handle a failure of navigation by\n   * showing an error message with the URL that failed.\n   */\n  urlUpdateStrategy?: 'deferred'|'eager';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * Example:\n   *\n   * ```\n   * const routes = [\n   *   {\n   *     path: '',\n   *     component: ContainerComponent,\n   *     children: [\n   *       { path: 'a', component: AComponent },\n   *       { path: 'b', component: BComponent },\n   *     ]\n   *   }\n   * ];\n   * ```\n   *\n   * From the `ContainerComponent`, you should be able to navigate to `AComponent` using\n   * the following `routerLink`, but it will not work if `relativeLinkResolution` is set\n   * to `'legacy'`:\n   *\n   * `<a [routerLink]=\"['./a']\">Link to A</a>`\n   *\n   * However, this will work:\n   *\n   * `<a [routerLink]=\"['../a']\">Link to A</a>`\n   *\n   * In other words, you're required to use `../` rather than `./` when the relative link\n   * resolution is set to `'legacy'`.\n   *\n   * The default in v11 is `corrected`.\n   */\n  relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n    urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n    injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][],\n    opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n    routeReuseStrategy?: RouteReuseStrategy) {\n  const router = new Router(\n      null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n  if (urlHandlingStrategy) {\n    router.urlHandlingStrategy = urlHandlingStrategy;\n  }\n\n  if (routeReuseStrategy) {\n    router.routeReuseStrategy = routeReuseStrategy;\n  }\n\n  assignExtraOptionsToRouter(opts, router);\n\n  if (opts.enableTracing) {\n    router.events.subscribe((e: Event) => {\n      // tslint:disable:no-console\n      console.group?.(`Router Event: ${(<any>e.constructor).name}`);\n      console.log(e.toString());\n      console.log(e);\n      console.groupEnd?.();\n      // tslint:enable:no-console\n    });\n  }\n\n  return router;\n}\n\nexport function assignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void {\n  if (opts.errorHandler) {\n    router.errorHandler = opts.errorHandler;\n  }\n\n  if (opts.malformedUriErrorHandler) {\n    router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n  }\n\n  if (opts.onSameUrlNavigation) {\n    router.onSameUrlNavigation = opts.onSameUrlNavigation;\n  }\n\n  if (opts.paramsInheritanceStrategy) {\n    router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n  }\n\n  if (opts.relativeLinkResolution) {\n    router.relativeLinkResolution = opts.relativeLinkResolution;\n  }\n\n  if (opts.urlUpdateStrategy) {\n    router.urlUpdateStrategy = opts.urlUpdateStrategy;\n  }\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n  return router.routerState.root;\n}\n\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer implements OnDestroy {\n  private initNavigation = false;\n  private destroyed = false;\n  private resultOfPreactivationDone = new Subject<void>();\n\n  constructor(private injector: Injector) {}\n\n  appInitializer(): Promise<any> {\n    const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n    return p.then(() => {\n      // If the injector was destroyed, the DI lookups below will fail.\n      if (this.destroyed) {\n        return Promise.resolve(true);\n      }\n\n      let resolve: Function = null!;\n      const res = new Promise(r => resolve = r);\n      const router = this.injector.get(Router);\n      const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n      if (opts.initialNavigation === 'disabled') {\n        router.setUpLocationChangeListener();\n        resolve(true);\n      } else if (\n          // TODO: enabled is deprecated as of v11, can be removed in v13\n          opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') {\n        router.hooks.afterPreactivation = () => {\n          // only the initial navigation should be delayed\n          if (!this.initNavigation) {\n            this.initNavigation = true;\n            resolve(true);\n            return this.resultOfPreactivationDone;\n\n            // subsequent navigations should not be delayed\n          } else {\n            return of(null) as any;\n          }\n        };\n        router.initialNavigation();\n      } else {\n        resolve(true);\n      }\n\n      return res;\n    });\n  }\n\n  bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n    const opts = this.injector.get(ROUTER_CONFIGURATION);\n    const preloader = this.injector.get(RouterPreloader);\n    const routerScroller = this.injector.get(RouterScroller);\n    const router = this.injector.get(Router);\n    const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n\n    // Default case\n    if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) {\n      router.initialNavigation();\n    }\n\n    preloader.setUpPreloading();\n    routerScroller.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    this.resultOfPreactivationDone.next(null!);\n    this.resultOfPreactivationDone.complete();\n  }\n\n  ngOnDestroy() {\n    this.destroyed = true;\n  }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n  return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n  return r.bootstrapListener.bind(r);\n}\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n    new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer(): ReadonlyArray<Provider> {\n  return [\n    RouterInitializer,\n    {\n      provide: APP_INITIALIZER,\n      multi: true,\n      useFactory: getAppInitializer,\n      deps: [RouterInitializer]\n    },\n    {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n  ];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('12.2.13');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, DeprecatedLoadChildren, LoadChildren, LoadChildrenCallback, QueryParamsHandling, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatcher, UrlMatchResult} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet, RouterOutletContract} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {BaseRouteReuseStrategy, DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationBehaviorOptions, NavigationExtras, Router, UrlCreationOptions} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, InitialNavigation, provideRoutes, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, IsActiveMatchOptions, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {EmptyOutletComponent as ɵangular_packages_router_router_l} from './src/components/empty_outlet';\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_o} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_m,TreeNode as ɵangular_packages_router_router_n} from './src/utils/tree';"],"names":["isObservable","isPromise","EmptyOutletComponent","noMatch","last","applyRedirects","applyRedirectsFn","NoMatch","recognize","recognizeFn","Console"],"mappings":";;;;;;;;;;;AAAA;;;;;;;AAsBA;;;;;;;;;;;;;;;;;;;;;;;;MAwBa,WAAW;IACtB;;IAEW,EAAU;;IAEV,GAAW;QAFX,OAAE,GAAF,EAAE,CAAQ;QAEV,QAAG,GAAH,GAAG,CAAQ;KAAI;CAC3B;AAED;;;;;MAKa,eAAgB,SAAQ,WAAW;IA8B9C;;IAEI,EAAU;;IAEV,GAAW;;IAEX,oBAA0D,YAAY;;IAEtE,gBAA+D,IAAI;QACrE,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;KACpC;;IAGQ,QAAQ;QACf,OAAO,uBAAuB,IAAI,CAAC,EAAE,WAAW,IAAI,CAAC,GAAG,IAAI,CAAC;KAC9D;CACF;AAED;;;;;;;;;MASa,aAAc,SAAQ,WAAW;IAC5C;;IAEI,EAAU;;IAEV,GAAW;;IAEJ,iBAAyB;QAClC,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QADN,sBAAiB,GAAjB,iBAAiB,CAAQ;KAEnC;;IAGQ,QAAQ;QACf,OAAO,qBAAqB,IAAI,CAAC,EAAE,WAAW,IAAI,CAAC,GAAG,0BAClD,IAAI,CAAC,iBAAiB,IAAI,CAAC;KAChC;CACF;AAED;;;;;;;;;;;MAWa,gBAAiB,SAAQ,WAAW;IAC/C;;IAEI,EAAU;;IAEV,G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B,EAAC;KAChF,CAAC;AACJ;;ACjmBA;;;;;;;AAgBA;;;MAGa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;ACnBtD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;AAeA;;ACfA;;;;;;;;ACAA;;;;;;"}
Index: trip-planner-front/node_modules/@angular/router/fesm2015/testing.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/fesm2015/testing.js	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/fesm2015/testing.js	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
Index: trip-planner-front/node_modules/@angular/router/fesm2015/upgrade.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/fesm2015/upgrade.js	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/fesm2015/upgrade.js	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
Index: trip-planner-front/node_modules/@angular/router/package.json
===================================================================
--- trip-planner-front/node_modules/@angular/router/package.json	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/package.json	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,13 +1,7 @@
 {
-  "_args": [
-    [
-      "@angular/router@12.2.9",
-      "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front"
-    ]
-  ],
-  "_from": "@angular/router@12.2.9",
-  "_id": "@angular/router@12.2.9",
+  "_from": "@angular/router@12.2.13",
+  "_id": "@angular/router@12.2.13",
   "_inBundle": false,
-  "_integrity": "sha512-Qh7Ugh6N7PIK4+ydRPHiKy8Q3wlB/ieXVyqYgkNfGFZ+QtNHpWgWBUXJuGPnmKk0Yn02EwSPOuPWEHV92rayhw==",
+  "_integrity": "sha512-HZL/Pzp6I7fQiMLrzfEzhnqhgNcGcFjBgMMOoLp5IA1IV26rp1NU6zYJzPrXtopBx7XLl8BECehAwFqrJsu/PQ==",
   "_location": "/@angular/router",
   "_phantomChildren": {},
@@ -15,17 +9,19 @@
     "type": "version",
     "registry": true,
-    "raw": "@angular/router@12.2.9",
+    "raw": "@angular/router@12.2.13",
     "name": "@angular/router",
     "escapedName": "@angular%2frouter",
     "scope": "@angular",
-    "rawSpec": "12.2.9",
+    "rawSpec": "12.2.13",
     "saveSpec": null,
-    "fetchSpec": "12.2.9"
+    "fetchSpec": "12.2.13"
   },
   "_requiredBy": [
+    "#USER",
     "/"
   ],
-  "_resolved": "https://registry.npmjs.org/@angular/router/-/router-12.2.9.tgz",
-  "_spec": "12.2.9",
+  "_resolved": "https://registry.npmjs.org/@angular/router/-/router-12.2.13.tgz",
+  "_shasum": "e5b939a9675f9d4834fee3e75eb8d040ef63b3b5",
+  "_spec": "@angular/router@12.2.13",
   "_where": "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front",
   "author": {
@@ -35,7 +31,9 @@
     "url": "https://github.com/angular/angular/issues"
   },
+  "bundleDependencies": false,
   "dependencies": {
     "tslib": "^2.2.0"
   },
+  "deprecated": false,
   "description": "Angular - the routing library",
   "engines": {
@@ -78,7 +76,7 @@
   },
   "peerDependencies": {
-    "@angular/core": "12.2.9",
-    "@angular/common": "12.2.9",
-    "@angular/platform-browser": "12.2.9",
+    "@angular/core": "12.2.13",
+    "@angular/common": "12.2.13",
+    "@angular/platform-browser": "12.2.13",
     "rxjs": "^6.5.3 || ^7.0.0"
   },
@@ -90,10 +88,10 @@
   "sideEffects": false,
   "typings": "./router.d.ts",
-  "version": "12.2.9",
+  "version": "12.2.13",
   "__processed_by_ivy_ngcc__": {
-    "es2015": "12.2.9",
-    "fesm2015": "12.2.9",
-    "module": "12.2.9",
-    "typings": "12.2.9"
+    "es2015": "12.2.13",
+    "fesm2015": "12.2.13",
+    "module": "12.2.13",
+    "typings": "12.2.13"
   },
   "scripts": {
Index: trip-planner-front/node_modules/@angular/router/router.d.ts
===================================================================
--- trip-planner-front/node_modules/@angular/router/router.d.ts	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/router.d.ts	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
Index: trip-planner-front/node_modules/@angular/router/router.d.ts.__ivy_ngcc_bak
===================================================================
--- trip-planner-front/node_modules/@angular/router/router.d.ts.__ivy_ngcc_bak	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/router.d.ts.__ivy_ngcc_bak	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
Index: trip-planner-front/node_modules/@angular/router/router.d.ts.map
===================================================================
--- trip-planner-front/node_modules/@angular/router/router.d.ts.map	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/router.d.ts.map	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,1 +1,1 @@
-{"version":3,"file":"router.d.ts","sources":["router.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":["/**\n * @license Angular v12.2.9\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { AfterContentInit } from '@angular/core';\r\nimport { ChangeDetectorRef } from '@angular/core';\r\nimport { Compiler } from '@angular/core';\r\nimport { ComponentFactoryResolver } from '@angular/core';\r\nimport { ComponentRef } from '@angular/core';\r\nimport { ElementRef } from '@angular/core';\r\nimport { EventEmitter } from '@angular/core';\r\nimport { HashLocationStrategy } from '@angular/common';\r\nimport { InjectionToken } from '@angular/core';\r\nimport { Injector } from '@angular/core';\r\nimport { Location as Location_2 } from '@angular/common';\r\nimport { LocationStrategy } from '@angular/common';\r\nimport { ModuleWithProviders } from '@angular/core';\r\nimport { NgModuleFactory } from '@angular/core';\r\nimport { NgModuleFactoryLoader } from '@angular/core';\r\nimport { NgProbeToken } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { OnChanges } from '@angular/core';\r\nimport { OnDestroy } from '@angular/core';\r\nimport { OnInit } from '@angular/core';\r\nimport { PathLocationStrategy } from '@angular/common';\r\nimport { PlatformLocation } from '@angular/common';\r\nimport { Provider } from '@angular/core';\r\nimport { QueryList } from '@angular/core';\r\nimport { Renderer2 } from '@angular/core';\r\nimport { SimpleChanges } from '@angular/core';\r\nimport { Type } from '@angular/core';\r\nimport { Version } from '@angular/core';\r\nimport { ViewContainerRef } from '@angular/core';\r\nimport { ViewportScroller } from '@angular/common';\r\n\r\n/**\r\n * Provides access to information about a route associated with a component\r\n * that is loaded in an outlet.\r\n * Use to traverse the `RouterState` tree and extract information from nodes.\r\n *\r\n * The following example shows how to construct a component using information from a\r\n * currently activated route.\r\n *\r\n * Note: the observables in this class only emit when the current and previous values differ based\r\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\r\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\r\n *\r\n * {@example router/activated-route/module.ts region=\"activated-route\"\r\n *     header=\"activated-route.component.ts\"}\r\n *\r\n * @see [Getting route information](guide/router#getting-route-information)\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ActivatedRoute {\r\n    /** An observable of the URL segments matched by this route. */\r\n    url: Observable<UrlSegment[]>;\r\n    /** An observable of the matrix parameters scoped to this route. */\r\n    params: Observable<Params>;\r\n    /** An observable of the query parameters shared by all the routes. */\r\n    queryParams: Observable<Params>;\r\n    /** An observable of the URL fragment shared by all the routes. */\r\n    fragment: Observable<string | null>;\r\n    /** An observable of the static and resolved data of this route. */\r\n    data: Observable<Data>;\r\n    /** The outlet name of the route, a constant. */\r\n    outlet: string;\r\n    /** The component of the route, a constant. */\r\n    component: Type<any> | string | null;\r\n    /** The current snapshot of this route */\r\n    snapshot: ActivatedRouteSnapshot;\r\n    /** The configuration used to match this route. */\r\n    get routeConfig(): Route | null;\r\n    /** The root of the router state. */\r\n    get root(): ActivatedRoute;\r\n    /** The parent of this route in the router state tree. */\r\n    get parent(): ActivatedRoute | null;\r\n    /** The first child of this route in the router state tree. */\r\n    get firstChild(): ActivatedRoute | null;\r\n    /** The children of this route in the router state tree. */\r\n    get children(): ActivatedRoute[];\r\n    /** The path from the root of the router state tree to this route. */\r\n    get pathFromRoot(): ActivatedRoute[];\r\n    /**\r\n     * An Observable that contains a map of the required and optional parameters\r\n     * specific to the route.\r\n     * The map supports retrieving single and multiple values from the same parameter.\r\n     */\r\n    get paramMap(): Observable<ParamMap>;\r\n    /**\r\n     * An Observable that contains a map of the query parameters available to all routes.\r\n     * The map supports retrieving single and multiple values from the query parameter.\r\n     */\r\n    get queryParamMap(): Observable<ParamMap>;\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Contains the information about a route associated with a component loaded in an\r\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\r\n * traverse the router state tree.\r\n *\r\n * The following example initializes a component with route information extracted\r\n * from the snapshot of the root node at the time of creation.\r\n *\r\n * ```\r\n * @Component({templateUrl:'./my-component.html'})\r\n * class MyComponent {\r\n *   constructor(route: ActivatedRoute) {\r\n *     const id: string = route.snapshot.params.id;\r\n *     const url: string = route.snapshot.url.join('');\r\n *     const user = route.snapshot.data.user;\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ActivatedRouteSnapshot {\r\n    /** The URL segments matched by this route */\r\n    url: UrlSegment[];\r\n    /**\r\n     *  The matrix parameters scoped to this route.\r\n     *\r\n     *  You can compute all params (or data) in the router state or to get params outside\r\n     *  of an activated component by traversing the `RouterState` tree as in the following\r\n     *  example:\r\n     *  ```\r\n     *  collectRouteParams(router: Router) {\r\n     *    let params = {};\r\n     *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\r\n     *    while (stack.length > 0) {\r\n     *      const route = stack.pop()!;\r\n     *      params = {...params, ...route.params};\r\n     *      stack.push(...route.children);\r\n     *    }\r\n     *    return params;\r\n     *  }\r\n     *  ```\r\n     */\r\n    params: Params;\r\n    /** The query parameters shared by all the routes */\r\n    queryParams: Params;\r\n    /** The URL fragment shared by all the routes */\r\n    fragment: string | null;\r\n    /** The static and resolved data of this route */\r\n    data: Data;\r\n    /** The outlet name of the route */\r\n    outlet: string;\r\n    /** The component of the route */\r\n    component: Type<any> | string | null;\r\n    /** The configuration used to match this route **/\r\n    readonly routeConfig: Route | null;\r\n    /** The root of the router state */\r\n    get root(): ActivatedRouteSnapshot;\r\n    /** The parent of this route in the router state tree */\r\n    get parent(): ActivatedRouteSnapshot | null;\r\n    /** The first child of this route in the router state tree */\r\n    get firstChild(): ActivatedRouteSnapshot | null;\r\n    /** The children of this route in the router state tree */\r\n    get children(): ActivatedRouteSnapshot[];\r\n    /** The path from the root of the router state tree to this route */\r\n    get pathFromRoot(): ActivatedRouteSnapshot[];\r\n    get paramMap(): ParamMap;\r\n    get queryParamMap(): ParamMap;\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered at the end of the activation part\r\n * of the Resolve phase of routing.\r\n * @see `ActivationStart`\r\n * @see `ResolveStart`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ActivationEnd {\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered at the start of the activation part\r\n * of the Resolve phase of routing.\r\n * @see `ActivationEnd`\r\n * @see `ResolveStart`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ActivationStart {\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * This base route reuse strategy only reuses routes when the matched router configs are\r\n * identical. This prevents components from being destroyed and recreated\r\n * when just the fragment or query parameters change\r\n * (that is, the existing component is _reused_).\r\n *\r\n * This strategy does not store any routes for later reuse.\r\n *\r\n * Angular uses this strategy by default.\r\n *\r\n *\r\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\r\n * class that extends the `BaseRouteReuseStrategy` one.\r\n * @publicApi\r\n */\r\nexport declare abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\r\n    /**\r\n     * Whether the given route should detach for later reuse.\r\n     * Always returns false for `BaseRouteReuseStrategy`.\r\n     * */\r\n    shouldDetach(route: ActivatedRouteSnapshot): boolean;\r\n    /**\r\n     * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\r\n     */\r\n    store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void;\r\n    /** Returns `false`, meaning the route (and its subtree) is never reattached */\r\n    shouldAttach(route: ActivatedRouteSnapshot): boolean;\r\n    /** Returns `null` because this strategy does not store routes for later re-use. */\r\n    retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null;\r\n    /**\r\n     * Determines if a route should be reused.\r\n     * This strategy returns `true` when the future route config and current route config are\r\n     * identical.\r\n     */\r\n    shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Interface that a class can implement to be a guard deciding if a route can be activated.\r\n * If all guards return `true`, navigation continues. If any guard returns `false`,\r\n * navigation is cancelled. If any guard returns a `UrlTree`, the current navigation\r\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\r\n *\r\n * The following example implements a `CanActivate` function that checks whether the\r\n * current user has permission to activate the requested route.\r\n *\r\n * ```\r\n * class UserToken {}\r\n * class Permissions {\r\n *   canActivate(user: UserToken, id: string): boolean {\r\n *     return true;\r\n *   }\r\n * }\r\n *\r\n * @Injectable()\r\n * class CanActivateTeam implements CanActivate {\r\n *   constructor(private permissions: Permissions, private currentUser: UserToken) {}\r\n *\r\n *   canActivate(\r\n *     route: ActivatedRouteSnapshot,\r\n *     state: RouterStateSnapshot\r\n *   ): Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree {\r\n *     return this.permissions.canActivate(this.currentUser, route.params.id);\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * Here, the defined guard function is provided as part of the `Route` object\r\n * in the router configuration:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         canActivate: [CanActivateTeam]\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [CanActivateTeam, UserToken, Permissions]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * You can alternatively provide an in-line function with the `canActivate` signature:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         canActivate: ['canActivateTeam']\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [\r\n *     {\r\n *       provide: 'canActivateTeam',\r\n *       useValue: (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => true\r\n *     }\r\n *   ]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface CanActivate {\r\n    canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Interface that a class can implement to be a guard deciding if a child route can be activated.\r\n * If all guards return `true`, navigation continues. If any guard returns `false`,\r\n * navigation is cancelled. If any guard returns a `UrlTree`, current navigation\r\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\r\n *\r\n * The following example implements a `CanActivateChild` function that checks whether the\r\n * current user has permission to activate the requested child route.\r\n *\r\n * ```\r\n * class UserToken {}\r\n * class Permissions {\r\n *   canActivate(user: UserToken, id: string): boolean {\r\n *     return true;\r\n *   }\r\n * }\r\n *\r\n * @Injectable()\r\n * class CanActivateTeam implements CanActivateChild {\r\n *   constructor(private permissions: Permissions, private currentUser: UserToken) {}\r\n *\r\n *   canActivateChild(\r\n *     route: ActivatedRouteSnapshot,\r\n *     state: RouterStateSnapshot\r\n *   ): Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree {\r\n *     return this.permissions.canActivate(this.currentUser, route.params.id);\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * Here, the defined guard function is provided as part of the `Route` object\r\n * in the router configuration:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'root',\r\n *         canActivateChild: [CanActivateTeam],\r\n *         children: [\r\n *           {\r\n *              path: 'team/:id',\r\n *              component: TeamComponent\r\n *           }\r\n *         ]\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [CanActivateTeam, UserToken, Permissions]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * You can alternatively provide an in-line function with the `canActivateChild` signature:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'root',\r\n *         canActivateChild: ['canActivateTeam'],\r\n *         children: [\r\n *           {\r\n *             path: 'team/:id',\r\n *             component: TeamComponent\r\n *           }\r\n *         ]\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [\r\n *     {\r\n *       provide: 'canActivateTeam',\r\n *       useValue: (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => true\r\n *     }\r\n *   ]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface CanActivateChild {\r\n    canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Interface that a class can implement to be a guard deciding if a route can be deactivated.\r\n * If all guards return `true`, navigation continues. If any guard returns `false`,\r\n * navigation is cancelled. If any guard returns a `UrlTree`, current navigation\r\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\r\n *\r\n * The following example implements a `CanDeactivate` function that checks whether the\r\n * current user has permission to deactivate the requested route.\r\n *\r\n * ```\r\n * class UserToken {}\r\n * class Permissions {\r\n *   canDeactivate(user: UserToken, id: string): boolean {\r\n *     return true;\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * Here, the defined guard function is provided as part of the `Route` object\r\n * in the router configuration:\r\n *\r\n * ```\r\n *\r\n * @Injectable()\r\n * class CanDeactivateTeam implements CanDeactivate<TeamComponent> {\r\n *   constructor(private permissions: Permissions, private currentUser: UserToken) {}\r\n *\r\n *   canDeactivate(\r\n *     component: TeamComponent,\r\n *     currentRoute: ActivatedRouteSnapshot,\r\n *     currentState: RouterStateSnapshot,\r\n *     nextState: RouterStateSnapshot\r\n *   ): Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree {\r\n *     return this.permissions.canDeactivate(this.currentUser, route.params.id);\r\n *   }\r\n * }\r\n *\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         canDeactivate: [CanDeactivateTeam]\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [CanDeactivateTeam, UserToken, Permissions]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * You can alternatively provide an in-line function with the `canDeactivate` signature:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         canDeactivate: ['canDeactivateTeam']\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [\r\n *     {\r\n *       provide: 'canDeactivateTeam',\r\n *       useValue: (component: TeamComponent, currentRoute: ActivatedRouteSnapshot, currentState:\r\n * RouterStateSnapshot, nextState: RouterStateSnapshot) => true\r\n *     }\r\n *   ]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface CanDeactivate<T> {\r\n    canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Interface that a class can implement to be a guard deciding if children can be loaded.\r\n * If all guards return `true`, navigation continues. If any guard returns `false`,\r\n * navigation is cancelled. If any guard returns a `UrlTree`, current navigation\r\n * is cancelled and a new navigation starts to the `UrlTree` returned from the guard.\r\n *\r\n * The following example implements a `CanLoad` function that decides whether the\r\n * current user has permission to load requested child routes.\r\n *\r\n *\r\n * ```\r\n * class UserToken {}\r\n * class Permissions {\r\n *   canLoadChildren(user: UserToken, id: string, segments: UrlSegment[]): boolean {\r\n *     return true;\r\n *   }\r\n * }\r\n *\r\n * @Injectable()\r\n * class CanLoadTeamSection implements CanLoad {\r\n *   constructor(private permissions: Permissions, private currentUser: UserToken) {}\r\n *\r\n *   canLoad(route: Route, segments: UrlSegment[]): Observable<boolean>|Promise<boolean>|boolean {\r\n *     return this.permissions.canLoadChildren(this.currentUser, route, segments);\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * Here, the defined guard function is provided as part of the `Route` object\r\n * in the router configuration:\r\n *\r\n * ```\r\n *\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         loadChildren: 'team.js',\r\n *         canLoad: [CanLoadTeamSection]\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [CanLoadTeamSection, UserToken, Permissions]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * You can alternatively provide an in-line function with the `canLoad` signature:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         loadChildren: 'team.js',\r\n *         canLoad: ['canLoadTeamSection']\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [\r\n *     {\r\n *       provide: 'canLoadTeamSection',\r\n *       useValue: (route: Route, segments: UrlSegment[]) => true\r\n *     }\r\n *   ]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface CanLoad {\r\n    canLoad(route: Route, segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;\r\n}\r\n\r\n/**\r\n * An event triggered at the end of the child-activation part\r\n * of the Resolve phase of routing.\r\n * @see `ChildActivationStart`\r\n * @see `ResolveStart`\r\n * @publicApi\r\n */\r\nexport declare class ChildActivationEnd {\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered at the start of the child-activation\r\n * part of the Resolve phase of routing.\r\n * @see  `ChildActivationEnd`\r\n * @see `ResolveStart`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ChildActivationStart {\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * Store contextual information about the children (= nested) `RouterOutlet`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ChildrenOutletContexts {\r\n    private contexts;\r\n    /** Called when a `RouterOutlet` directive is instantiated */\r\n    onChildOutletCreated(childName: string, outlet: RouterOutletContract): void;\r\n    /**\r\n     * Called when a `RouterOutlet` directive is destroyed.\r\n     * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\r\n     * re-created later.\r\n     */\r\n    onChildOutletDestroyed(childName: string): void;\r\n    /**\r\n     * Called when the corresponding route is deactivated during navigation.\r\n     * Because the component get destroyed, all children outlet are destroyed.\r\n     */\r\n    onOutletDeactivated(): Map<string, OutletContext>;\r\n    onOutletReAttached(contexts: Map<string, OutletContext>): void;\r\n    getOrCreateContext(childName: string): OutletContext;\r\n    getContext(childName: string): OutletContext | null;\r\n}\r\n\r\n/**\r\n * Converts a `Params` instance to a `ParamMap`.\r\n * @param params The instance to convert.\r\n * @returns The new map instance.\r\n *\r\n * @publicApi\r\n */\r\nexport declare function convertToParamMap(params: Params): ParamMap;\r\n\r\n/**\r\n *\r\n * Represents static data associated with a particular route.\r\n *\r\n * @see `Route#data`\r\n *\r\n * @publicApi\r\n */\r\nexport declare type Data = {\r\n    [name: string]: any;\r\n};\r\n\r\n/**\r\n * @description\r\n *\r\n * A default implementation of the `UrlSerializer`.\r\n *\r\n * Example URLs:\r\n *\r\n * ```\r\n * /inbox/33(popup:compose)\r\n * /inbox/33;open=true/messages/44\r\n * ```\r\n *\r\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\r\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\r\n * specify route specific parameters.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class DefaultUrlSerializer implements UrlSerializer {\r\n    /** Parses a url into a `UrlTree` */\r\n    parse(url: string): UrlTree;\r\n    /** Converts a `UrlTree` into a url */\r\n    serialize(tree: UrlTree): string;\r\n}\r\n\r\n/**\r\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\r\n *\r\n * @see `loadChildrenCallback`\r\n * @publicApi\r\n * @deprecated The `string` form of `loadChildren` is deprecated in favor of the\r\n * `LoadChildrenCallback` function which uses the ES dynamic `import()` expression.\r\n * This offers a more natural and standards-based mechanism to dynamically\r\n * load an ES module at runtime.\r\n */\r\nexport declare type DeprecatedLoadChildren = string;\r\n\r\n/**\r\n * @description\r\n *\r\n * Represents the detached route tree.\r\n *\r\n * This is an opaque value the router will give to a custom route reuse strategy\r\n * to store and retrieve later on.\r\n *\r\n * @publicApi\r\n */\r\nexport declare type DetachedRouteHandle = {};\r\n\r\n/**\r\n * Error handler that is invoked when a navigation error occurs.\r\n *\r\n * If the handler returns a value, the navigation Promise is resolved with this value.\r\n * If the handler throws an exception, the navigation Promise is rejected with\r\n * the exception.\r\n *\r\n * @publicApi\r\n */\r\ndeclare type ErrorHandler = (error: any) => any;\r\n\r\n/**\r\n * Router events that allow you to track the lifecycle of the router.\r\n *\r\n * The events occur in the following sequence:\r\n *\r\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\r\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\r\n * the router [lazy loads](/guide/router#lazy-loading) a route configuration.\r\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\r\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\r\n * and the routes are recognized.\r\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\r\n * phase of routing.\r\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\r\n * begins activating a route's children.\r\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\r\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\r\n * phase of routing successfully.\r\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\r\n * phase of routing.\r\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\r\n * phase of routing successfully.\r\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\r\n * activating a route's children.\r\n * * [ActivationEnd](api/router/ActivationEnd): When the router finishes activating a route.\r\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\r\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\r\n * * [NavigationError](api/router/NavigationError): When navigation fails\r\n * due to an unexpected error.\r\n * * [Scroll](api/router/Scroll): When the user scrolls.\r\n *\r\n * @publicApi\r\n */\r\ndeclare type Event_2 = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;\r\nexport { Event_2 as Event }\r\n\r\n/**\r\n * A set of configuration options for a router module, provided in the\r\n * `forRoot()` method.\r\n *\r\n * @see `forRoot()`\r\n *\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface ExtraOptions {\r\n    /**\r\n     * When true, log all internal navigation events to the console.\r\n     * Use for debugging.\r\n     */\r\n    enableTracing?: boolean;\r\n    /**\r\n     * When true, enable the location strategy that uses the URL fragment\r\n     * instead of the history API.\r\n     */\r\n    useHash?: boolean;\r\n    /**\r\n     * One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.\r\n     * When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root\r\n     * component is created. The bootstrap is blocked until the initial navigation is complete. This\r\n     * value is required for [server-side rendering](guide/universal) to work. When set to\r\n     * `enabledNonBlocking`, the initial navigation starts after the root component has been created.\r\n     * The bootstrap is not blocked on the completion of the initial navigation. When set to\r\n     * `disabled`, the initial navigation is not performed. The location listener is set up before the\r\n     * root component gets created. Use if there is a reason to have more control over when the router\r\n     * starts its initial navigation due to some complex initialization logic.\r\n     */\r\n    initialNavigation?: InitialNavigation;\r\n    /**\r\n     * A custom error handler for failed navigations.\r\n     * If the handler returns a value, the navigation Promise is resolved with this value.\r\n     * If the handler throws an exception, the navigation Promise is rejected with the exception.\r\n     *\r\n     */\r\n    errorHandler?: ErrorHandler;\r\n    /**\r\n     * Configures a preloading strategy.\r\n     * One of `PreloadAllModules` or `NoPreloading` (the default).\r\n     */\r\n    preloadingStrategy?: any;\r\n    /**\r\n     * Define what the router should do if it receives a navigation request to the current URL.\r\n     * Default is `ignore`, which causes the router ignores the navigation.\r\n     * This can disable features such as a \"refresh\" button.\r\n     * Use this option to configure the behavior when navigating to the\r\n     * current URL. Default is 'ignore'.\r\n     */\r\n    onSameUrlNavigation?: 'reload' | 'ignore';\r\n    /**\r\n     * Configures if the scroll position needs to be restored when navigating back.\r\n     *\r\n     * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\r\n     * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\r\n     * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\r\n     * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\r\n     * navigation). This option will be the default in the future.\r\n     *\r\n     * You can implement custom scroll restoration behavior by adapting the enabled behavior as\r\n     * in the following example.\r\n     *\r\n     * ```typescript\r\n     * class AppModule {\r\n     *   constructor(router: Router, viewportScroller: ViewportScroller) {\r\n     *     router.events.pipe(\r\n     *       filter((e: Event): e is Scroll => e instanceof Scroll)\r\n     *     ).subscribe(e => {\r\n     *       if (e.position) {\r\n     *         // backward navigation\r\n     *         viewportScroller.scrollToPosition(e.position);\r\n     *       } else if (e.anchor) {\r\n     *         // anchor navigation\r\n     *         viewportScroller.scrollToAnchor(e.anchor);\r\n     *       } else {\r\n     *         // forward navigation\r\n     *         viewportScroller.scrollToPosition([0, 0]);\r\n     *       }\r\n     *     });\r\n     *   }\r\n     * }\r\n     * ```\r\n     */\r\n    scrollPositionRestoration?: 'disabled' | 'enabled' | 'top';\r\n    /**\r\n     * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\r\n     * Anchor scrolling is disabled by default.\r\n     *\r\n     * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\r\n     * that we stored or scroll to the top.\r\n     */\r\n    anchorScrolling?: 'disabled' | 'enabled';\r\n    /**\r\n     * Configures the scroll offset the router will use when scrolling to an element.\r\n     *\r\n     * When given a tuple with x and y position value,\r\n     * the router uses that offset each time it scrolls.\r\n     * When given a function, the router invokes the function every time\r\n     * it restores scroll position.\r\n     */\r\n    scrollOffset?: [number, number] | (() => [number, number]);\r\n    /**\r\n     * Defines how the router merges parameters, data, and resolved data from parent to child\r\n     * routes. By default ('emptyOnly'), inherits parent parameters only for\r\n     * path-less or component-less routes.\r\n     *\r\n     * Set to 'always' to enable unconditional inheritance of parent parameters.\r\n     *\r\n     * Note that when dealing with matrix parameters, \"parent\" refers to the parent `Route`\r\n     * config which does not necessarily mean the \"URL segment to the left\". When the `Route` `path`\r\n     * contains multiple segments, the matrix parameters must appear on the last segment. For example,\r\n     * matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not\r\n     * `a;foo=bar/b`.\r\n     *\r\n     */\r\n    paramsInheritanceStrategy?: 'emptyOnly' | 'always';\r\n    /**\r\n     * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\r\n     * invalid character sequences.\r\n     * The default implementation is to redirect to the root URL, dropping\r\n     * any path or parameter information. The function takes three parameters:\r\n     *\r\n     * - `'URIError'` - Error thrown when parsing a bad URL.\r\n     * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\r\n     * - `'url'` -  The malformed URL that caused the URIError\r\n     * */\r\n    malformedUriErrorHandler?: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\r\n    /**\r\n     * Defines when the router updates the browser URL. By default ('deferred'),\r\n     * update after successful navigation.\r\n     * Set to 'eager' if prefer to update the URL at the beginning of navigation.\r\n     * Updating the URL early allows you to handle a failure of navigation by\r\n     * showing an error message with the URL that failed.\r\n     */\r\n    urlUpdateStrategy?: 'deferred' | 'eager';\r\n    /**\r\n     * Enables a bug fix that corrects relative link resolution in components with empty paths.\r\n     * Example:\r\n     *\r\n     * ```\r\n     * const routes = [\r\n     *   {\r\n     *     path: '',\r\n     *     component: ContainerComponent,\r\n     *     children: [\r\n     *       { path: 'a', component: AComponent },\r\n     *       { path: 'b', component: BComponent },\r\n     *     ]\r\n     *   }\r\n     * ];\r\n     * ```\r\n     *\r\n     * From the `ContainerComponent`, you should be able to navigate to `AComponent` using\r\n     * the following `routerLink`, but it will not work if `relativeLinkResolution` is set\r\n     * to `'legacy'`:\r\n     *\r\n     * `<a [routerLink]=\"['./a']\">Link to A</a>`\r\n     *\r\n     * However, this will work:\r\n     *\r\n     * `<a [routerLink]=\"['../a']\">Link to A</a>`\r\n     *\r\n     * In other words, you're required to use `../` rather than `./` when the relative link\r\n     * resolution is set to `'legacy'`.\r\n     *\r\n     * The default in v11 is `corrected`.\r\n     */\r\n    relativeLinkResolution?: 'legacy' | 'corrected';\r\n}\r\n\r\n/**\r\n * An event triggered at the end of the Guard phase of routing.\r\n *\r\n * @see `GuardsCheckStart`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class GuardsCheckEnd extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot;\r\n    /** @docsNotRequired */\r\n    shouldActivate: boolean;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string, \r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot, \r\n    /** @docsNotRequired */\r\n    shouldActivate: boolean);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered at the start of the Guard phase of routing.\r\n *\r\n * @see `GuardsCheckEnd`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class GuardsCheckStart extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string, \r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * Allowed values in an `ExtraOptions` object that configure\r\n * when the router performs the initial navigation operation.\r\n *\r\n * * 'enabledNonBlocking' - (default) The initial navigation starts after the\r\n * root component has been created. The bootstrap is not blocked on the completion of the initial\r\n * navigation.\r\n * * 'enabledBlocking' - The initial navigation starts before the root component is created.\r\n * The bootstrap is blocked until the initial navigation is complete. This value is required\r\n * for [server-side rendering](guide/universal) to work.\r\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\r\n * the root component gets created. Use if there is a reason to have\r\n * more control over when the router starts its initial navigation due to some complex\r\n * initialization logic.\r\n *\r\n * The following values have been [deprecated](guide/releases#deprecation-practices) since v11,\r\n * and should not be used for new applications.\r\n *\r\n * * 'enabled' - This option is 1:1 replaceable with `enabledBlocking`.\r\n *\r\n * @see `forRoot()`\r\n *\r\n * @publicApi\r\n */\r\nexport declare type InitialNavigation = 'disabled' | 'enabled' | 'enabledBlocking' | 'enabledNonBlocking';\r\n\r\n/**\r\n * A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`\r\n * for the current router state.\r\n *\r\n * @publicApi\r\n * @see Router.isActive\r\n */\r\nexport declare interface IsActiveMatchOptions {\r\n    /**\r\n     * Defines the strategy for comparing the matrix parameters of two `UrlTree`s.\r\n     *\r\n     * The matrix parameter matching is dependent on the strategy for matching the\r\n     * segments. That is, if the `paths` option is set to `'subset'`, only\r\n     * the matrix parameters of the matching segments will be compared.\r\n     *\r\n     * - `'exact'`: Requires that matching segments also have exact matrix parameter\r\n     * matches.\r\n     * - `'subset'`: The matching segments in the router's active `UrlTree` may contain\r\n     * extra matrix parameters, but those that exist in the `UrlTree` in question must match.\r\n     * - `'ignored'`: When comparing `UrlTree`s, matrix params will be ignored.\r\n     */\r\n    matrixParams: 'exact' | 'subset' | 'ignored';\r\n    /**\r\n     * Defines the strategy for comparing the query parameters of two `UrlTree`s.\r\n     *\r\n     * - `'exact'`: the query parameters must match exactly.\r\n     * - `'subset'`: the active `UrlTree` may contain extra parameters,\r\n     * but must match the key and value of any that exist in the `UrlTree` in question.\r\n     * - `'ignored'`: When comparing `UrlTree`s, query params will be ignored.\r\n     */\r\n    queryParams: 'exact' | 'subset' | 'ignored';\r\n    /**\r\n     * Defines the strategy for comparing the `UrlSegment`s of the `UrlTree`s.\r\n     *\r\n     * - `'exact'`: all segments in each `UrlTree` must match.\r\n     * - `'subset'`: a `UrlTree` will be determined to be active if it\r\n     * is a subtree of the active route. That is, the active route may contain extra\r\n     * segments, but must at least have all the segements of the `UrlTree` in question.\r\n     */\r\n    paths: 'exact' | 'subset';\r\n    /**\r\n     * - 'exact'`: indicates that the `UrlTree` fragments must be equal.\r\n     * - `'ignored'`: the fragments will not be compared when determining if a\r\n     * `UrlTree` is active.\r\n     */\r\n    fragment: 'exact' | 'ignored';\r\n}\r\n\r\n/**\r\n *\r\n * A function that returns a set of routes to load.\r\n *\r\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\r\n * form (`LoadChildrenCallback`) should be used instead.\r\n *\r\n * @see `loadChildrenCallback`\r\n * @publicApi\r\n */\r\nexport declare type LoadChildren = LoadChildrenCallback | DeprecatedLoadChildren;\r\n\r\n/**\r\n *\r\n * A function that is called to resolve a collection of lazy-loaded routes.\r\n * Must be an arrow function of the following form:\r\n * `() => import('...').then(mod => mod.MODULE)`\r\n *\r\n * For example:\r\n *\r\n * ```\r\n * [{\r\n *   path: 'lazy',\r\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\r\n * }];\r\n * ```\r\n *\r\n * @see [Route.loadChildren](api/router/Route#loadChildren)\r\n * @publicApi\r\n */\r\nexport declare type LoadChildrenCallback = () => Type<any> | NgModuleFactory<any> | Observable<Type<any>> | Promise<NgModuleFactory<any> | Type<any> | any>;\r\n\r\n/**\r\n * Information about a navigation operation.\r\n * Retrieve the most recent navigation object with the\r\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\r\n *\r\n * * *id* : The unique identifier of the current navigation.\r\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\r\n * This is the value before the router has parsed or applied redirects to it.\r\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\r\n * * *finalUrl* : The extracted URL after redirects have been applied.\r\n * This URL may not be available immediately, therefore this property can be `undefined`.\r\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\r\n * * *trigger* : Identifies how this navigation was triggered.\r\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\r\n * -- 'popstate'--Triggered by a popstate event.\r\n * -- 'hashchange'--Triggered by a hashchange event.\r\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\r\n * navigation.\r\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\r\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\r\n * own `previousNavigation`.\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface Navigation {\r\n    /**\r\n     * The unique identifier of the current navigation.\r\n     */\r\n    id: number;\r\n    /**\r\n     * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\r\n     * the value before the router has parsed or applied redirects to it.\r\n     */\r\n    initialUrl: string | UrlTree;\r\n    /**\r\n     * The initial target URL after being parsed with `UrlSerializer.extract()`.\r\n     */\r\n    extractedUrl: UrlTree;\r\n    /**\r\n     * The extracted URL after redirects have been applied.\r\n     * This URL may not be available immediately, therefore this property can be `undefined`.\r\n     * It is guaranteed to be set after the `RoutesRecognized` event fires.\r\n     */\r\n    finalUrl?: UrlTree;\r\n    /**\r\n     * Identifies how this navigation was triggered.\r\n     *\r\n     * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\r\n     * * 'popstate'--Triggered by a popstate event.\r\n     * * 'hashchange'--Triggered by a hashchange event.\r\n     */\r\n    trigger: 'imperative' | 'popstate' | 'hashchange';\r\n    /**\r\n     * Options that controlled the strategy used for this navigation.\r\n     * See `NavigationExtras`.\r\n     */\r\n    extras: NavigationExtras;\r\n    /**\r\n     * The previously successful `Navigation` object. Only one previous navigation\r\n     * is available, therefore this previous `Navigation` object has a `null` value\r\n     * for its own `previousNavigation`.\r\n     */\r\n    previousNavigation: Navigation | null;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Options that modify the `Router` navigation strategy.\r\n * Supply an object containing any of these properties to a `Router` navigation function to\r\n * control how the navigation should be handled.\r\n *\r\n * @see [Router.navigate() method](api/router/Router#navigate)\r\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\r\n * @see [Routing and Navigation guide](guide/router)\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface NavigationBehaviorOptions {\r\n    /**\r\n     * When true, navigates without pushing a new state into history.\r\n     *\r\n     * ```\r\n     * // Navigate silently to /view\r\n     * this.router.navigate(['/view'], { skipLocationChange: true });\r\n     * ```\r\n     */\r\n    skipLocationChange?: boolean;\r\n    /**\r\n     * When true, navigates while replacing the current state in history.\r\n     *\r\n     * ```\r\n     * // Navigate to /view\r\n     * this.router.navigate(['/view'], { replaceUrl: true });\r\n     * ```\r\n     */\r\n    replaceUrl?: boolean;\r\n    /**\r\n     * Developer-defined state that can be passed to any navigation.\r\n     * Access this value through the `Navigation.extras` object\r\n     * returned from the [Router.getCurrentNavigation()\r\n     * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\r\n     *\r\n     * After a navigation completes, the router writes an object containing this\r\n     * value together with a `navigationId` to `history.state`.\r\n     * The value is written when `location.go()` or `location.replaceState()`\r\n     * is called before activating this route.\r\n     *\r\n     * Note that `history.state` does not pass an object equality test because\r\n     * the router adds the `navigationId` on each navigation.\r\n     *\r\n     */\r\n    state?: {\r\n        [k: string]: any;\r\n    };\r\n}\r\n\r\n/**\r\n * An event triggered when a navigation is canceled, directly or indirectly.\r\n * This can happen for several reasons including when a route guard\r\n * returns `false` or initiates a redirect by returning a `UrlTree`.\r\n *\r\n * @see `NavigationStart`\r\n * @see `NavigationEnd`\r\n * @see `NavigationError`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class NavigationCancel extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    reason: string;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    reason: string);\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered when a navigation ends successfully.\r\n *\r\n * @see `NavigationStart`\r\n * @see `NavigationCancel`\r\n * @see `NavigationError`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class NavigationEnd extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string);\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered when a navigation fails due to an unexpected error.\r\n *\r\n * @see `NavigationStart`\r\n * @see `NavigationEnd`\r\n * @see `NavigationCancel`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class NavigationError extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    error: any;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    error: any);\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Options that modify the `Router` navigation strategy.\r\n * Supply an object containing any of these properties to a `Router` navigation function to\r\n * control how the target URL should be constructed or interpreted.\r\n *\r\n * @see [Router.navigate() method](api/router/Router#navigate)\r\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\r\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\r\n * @see [Routing and Navigation guide](guide/router)\r\n * @see UrlCreationOptions\r\n * @see NavigationBehaviorOptions\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {\r\n}\r\n\r\n/**\r\n * An event triggered when a navigation starts.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class NavigationStart extends RouterEvent {\r\n    /**\r\n     * Identifies the call or event that triggered the navigation.\r\n     * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\r\n     *\r\n     * @see `NavigationEnd`\r\n     * @see `NavigationCancel`\r\n     * @see `NavigationError`\r\n     */\r\n    navigationTrigger?: 'imperative' | 'popstate' | 'hashchange';\r\n    /**\r\n     * The navigation state that was previously supplied to the `pushState` call,\r\n     * when the navigation is triggered by a `popstate` event. Otherwise null.\r\n     *\r\n     * The state object is defined by `NavigationExtras`, and contains any\r\n     * developer-defined state value, as well as a unique ID that\r\n     * the router assigns to every router transition/navigation.\r\n     *\r\n     * From the perspective of the router, the router never \"goes back\".\r\n     * When the user clicks on the back button in the browser,\r\n     * a new navigation ID is created.\r\n     *\r\n     * Use the ID in this previous-state object to differentiate between a newly created\r\n     * state and one returned to by a `popstate` event, so that you can restore some\r\n     * remembered state, such as scroll position.\r\n     *\r\n     */\r\n    restoredState?: {\r\n        [k: string]: any;\r\n        navigationId: number;\r\n    } | null;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    navigationTrigger?: 'imperative' | 'popstate' | 'hashchange', \r\n    /** @docsNotRequired */\r\n    restoredState?: {\r\n        [k: string]: any;\r\n        navigationId: number;\r\n    } | null);\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Provides a preloading strategy that does not preload any modules.\r\n *\r\n * This strategy is enabled by default.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class NoPreloading implements PreloadingStrategy {\r\n    preload(route: Route, fn: () => Observable<any>): Observable<any>;\r\n}\r\n\r\n/**\r\n * Store contextual information about a `RouterOutlet`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class OutletContext {\r\n    outlet: RouterOutletContract | null;\r\n    route: ActivatedRoute | null;\r\n    resolver: ComponentFactoryResolver | null;\r\n    children: ChildrenOutletContexts;\r\n    attachRef: ComponentRef<any> | null;\r\n}\r\n\r\n/**\r\n * A map that provides access to the required and optional parameters\r\n * specific to a route.\r\n * The map supports retrieving a single value with `get()`\r\n * or multiple values with `getAll()`.\r\n *\r\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface ParamMap {\r\n    /**\r\n     * Reports whether the map contains a given parameter.\r\n     * @param name The parameter name.\r\n     * @returns True if the map contains the given parameter, false otherwise.\r\n     */\r\n    has(name: string): boolean;\r\n    /**\r\n     * Retrieves a single value for a parameter.\r\n     * @param name The parameter name.\r\n     * @return The parameter's single value,\r\n     * or the first value if the parameter has multiple values,\r\n     * or `null` when there is no such parameter.\r\n     */\r\n    get(name: string): string | null;\r\n    /**\r\n     * Retrieves multiple values for a parameter.\r\n     * @param name The parameter name.\r\n     * @return An array containing one or more values,\r\n     * or an empty array if there is no such parameter.\r\n     *\r\n     */\r\n    getAll(name: string): string[];\r\n    /** Names of the parameters in the map. */\r\n    readonly keys: string[];\r\n}\r\n\r\n/**\r\n * A collection of matrix and query URL parameters.\r\n * @see `convertToParamMap()`\r\n * @see `ParamMap`\r\n *\r\n * @publicApi\r\n */\r\nexport declare type Params = {\r\n    [key: string]: any;\r\n};\r\n\r\n/**\r\n * @description\r\n *\r\n * Provides a preloading strategy that preloads all modules as quickly as possible.\r\n *\r\n * ```\r\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class PreloadAllModules implements PreloadingStrategy {\r\n    preload(route: Route, fn: () => Observable<any>): Observable<any>;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Provides a preloading strategy.\r\n *\r\n * @publicApi\r\n */\r\nexport declare abstract class PreloadingStrategy {\r\n    abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\r\n}\r\n\r\n/**\r\n * The primary routing outlet.\r\n *\r\n * @publicApi\r\n */\r\nexport declare const PRIMARY_OUTLET = \"primary\";\r\n\r\n/**\r\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\r\n * @param routes The route configuration to provide.\r\n *\r\n * @usageNotes\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [RouterModule.forChild(ROUTES)],\r\n *   providers: [provideRoutes(EXTRA_ROUTES)]\r\n * })\r\n * class MyNgModule {}\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare function provideRoutes(routes: Routes): any;\r\n\r\n/**\r\n *\r\n * How to handle query parameters in a router link.\r\n * One of:\r\n * - `merge` : Merge new with current parameters.\r\n * - `preserve` : Preserve current parameters.\r\n *\r\n * @see `UrlCreationOptions#queryParamsHandling`\r\n * @see `RouterLink`\r\n * @publicApi\r\n */\r\nexport declare type QueryParamsHandling = 'merge' | 'preserve' | '';\r\n\r\n/**\r\n * @description\r\n *\r\n * Interface that classes can implement to be a data provider.\r\n * A data provider class can be used with the router to resolve data during navigation.\r\n * The interface defines a `resolve()` method that is invoked when the navigation starts.\r\n * The router waits for the data to be resolved before the route is finally activated.\r\n *\r\n * The following example implements a `resolve()` method that retrieves the data\r\n * needed to activate the requested route.\r\n *\r\n * ```\r\n * @Injectable({ providedIn: 'root' })\r\n * export class HeroResolver implements Resolve<Hero> {\r\n *   constructor(private service: HeroService) {}\r\n *\r\n *   resolve(\r\n *     route: ActivatedRouteSnapshot,\r\n *     state: RouterStateSnapshot\r\n *   ): Observable<any>|Promise<any>|any {\r\n *     return this.service.getHero(route.paramMap.get('id'));\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * Here, the defined `resolve()` function is provided as part of the `Route` object\r\n * in the router configuration:\r\n *\r\n * ```\r\n\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'detail/:id',\r\n *         component: HeroDetailComponent,\r\n *         resolve: {\r\n *           hero: HeroResolver\r\n *         }\r\n *       }\r\n *     ])\r\n *   ],\r\n *   exports: [RouterModule]\r\n * })\r\n * export class AppRoutingModule {}\r\n * ```\r\n *\r\n * You can alternatively provide an in-line function with the `resolve()` signature:\r\n *\r\n * ```\r\n * export const myHero: Hero = {\r\n *   // ...\r\n * }\r\n *\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'detail/:id',\r\n *         component: HeroComponent,\r\n *         resolve: {\r\n *           hero: 'heroResolver'\r\n *         }\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [\r\n *     {\r\n *       provide: 'heroResolver',\r\n *       useValue: (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => myHero\r\n *     }\r\n *   ]\r\n * })\r\n * export class AppModule {}\r\n * ```\r\n *\r\n * @usageNotes\r\n *\r\n * When both guard and resolvers are specified, the resolvers are not executed until\r\n * all guards have run and succeeded.\r\n * For example, consider the following route configuration:\r\n *\r\n * ```\r\n * {\r\n *  path: 'base'\r\n *  canActivate: [BaseGuard],\r\n *  resolve: {data: BaseDataResolver}\r\n *  children: [\r\n *   {\r\n *     path: 'child',\r\n *     guards: [ChildGuard],\r\n *     component: ChildComponent,\r\n *     resolve: {childData: ChildDataResolver}\r\n *    }\r\n *  ]\r\n * }\r\n * ```\r\n * The order of execution is: BaseGuard, ChildGuard, BaseDataResolver, ChildDataResolver.\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface Resolve<T> {\r\n    resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<T> | Promise<T> | T;\r\n}\r\n\r\n/**\r\n *\r\n * Represents the resolved data associated with a particular route.\r\n *\r\n * @see `Route#resolve`.\r\n *\r\n * @publicApi\r\n */\r\nexport declare type ResolveData = {\r\n    [name: string]: any;\r\n};\r\n\r\n/**\r\n * An event triggered at the end of the Resolve phase of routing.\r\n * @see `ResolveStart`.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ResolveEnd extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string, \r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered at the start of the Resolve phase of routing.\r\n *\r\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\r\n * In future, may change to only run when there are things to be resolved.\r\n *\r\n * @see `ResolveEnd`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ResolveStart extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string, \r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * A configuration object that defines a single route.\r\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\r\n * The router attempts to match segments of a given URL against each route,\r\n * using the configuration options defined in this object.\r\n *\r\n * Supports static, parameterized, redirect, and wildcard routes, as well as\r\n * custom route data and resolve methods.\r\n *\r\n * For detailed usage information, see the [Routing Guide](guide/router).\r\n *\r\n * @usageNotes\r\n *\r\n * ### Simple Configuration\r\n *\r\n * The following route specifies that when navigating to, for example,\r\n * `/team/11/user/bob`, the router creates the 'Team' component\r\n * with the 'User' child component in it.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'team/:id',\r\n *  component: Team,\r\n *   children: [{\r\n *     path: 'user/:name',\r\n *     component: User\r\n *   }]\r\n * }]\r\n * ```\r\n *\r\n * ### Multiple Outlets\r\n *\r\n * The following route creates sibling components with multiple outlets.\r\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\r\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'team/:id',\r\n *   component: Team\r\n * }, {\r\n *   path: 'chat/:user',\r\n *   component: Chat\r\n *   outlet: 'aux'\r\n * }]\r\n * ```\r\n *\r\n * ### Wild Cards\r\n *\r\n * The following route uses wild-card notation to specify a component\r\n * that is always instantiated regardless of where you navigate to.\r\n *\r\n * ```\r\n * [{\r\n *   path: '**',\r\n *   component: WildcardComponent\r\n * }]\r\n * ```\r\n *\r\n * ### Redirects\r\n *\r\n * The following route uses the `redirectTo` property to ignore a segment of\r\n * a given URL when looking for a child path.\r\n *\r\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\r\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\r\n * the Team component with the User child component in it.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'team/:id',\r\n *   component: Team,\r\n *   children: [{\r\n *     path: 'legacy/user/:name',\r\n *     redirectTo: 'user/:name'\r\n *   }, {\r\n *     path: 'user/:name',\r\n *     component: User\r\n *   }]\r\n * }]\r\n * ```\r\n *\r\n * The redirect path can be relative, as shown in this example, or absolute.\r\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\r\n * the result URL is also absolute, '/user/jim'.\r\n\r\n * ### Empty Path\r\n *\r\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\r\n * any URL segments.\r\n *\r\n * In the following configuration, when navigating to\r\n * `/team/11`, the router instantiates the 'AllUsers' component.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'team/:id',\r\n *   component: Team,\r\n *   children: [{\r\n *     path: '',\r\n *     component: AllUsers\r\n *   }, {\r\n *     path: 'user/:name',\r\n *     component: User\r\n *   }]\r\n * }]\r\n * ```\r\n *\r\n * Empty-path routes can have children. In the following example, when navigating\r\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\r\n * the user component in it.\r\n *\r\n * Note that an empty path route inherits its parent's parameters and data.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'team/:id',\r\n *   component: Team,\r\n *   children: [{\r\n *     path: '',\r\n *     component: WrapperCmp,\r\n *     children: [{\r\n *       path: 'user/:name',\r\n *       component: User\r\n *     }]\r\n *   }]\r\n * }]\r\n * ```\r\n *\r\n * ### Matching Strategy\r\n *\r\n * The default path-match strategy is 'prefix', which means that the router\r\n * checks URL elements from the left to see if the URL matches a specified path.\r\n * For example, '/team/11/user' matches 'team/:id'.\r\n *\r\n * ```\r\n * [{\r\n *   path: '',\r\n *   pathMatch: 'prefix', //default\r\n *   redirectTo: 'main'\r\n * }, {\r\n *   path: 'main',\r\n *   component: Main\r\n * }]\r\n * ```\r\n *\r\n * You can specify the path-match strategy 'full' to make sure that the path\r\n * covers the whole unconsumed URL. It is important to do this when redirecting\r\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\r\n * the router would apply the redirect even when navigating to the redirect destination,\r\n * creating an endless loop.\r\n *\r\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\r\n * that the router applies the redirect if and only if navigating to '/'.\r\n *\r\n * ```\r\n * [{\r\n *   path: '',\r\n *   pathMatch: 'full',\r\n *   redirectTo: 'main'\r\n * }, {\r\n *   path: 'main',\r\n *   component: Main\r\n * }]\r\n * ```\r\n *\r\n * ### Componentless Routes\r\n *\r\n * You can share parameters between sibling components.\r\n * For example, suppose that two sibling components should go next to each other,\r\n * and both of them require an ID parameter. You can accomplish this using a route\r\n * that does not specify a component at the top level.\r\n *\r\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\r\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\r\n * the main child and aux child components next to each other.\r\n * For this to work, the application component must have the primary and aux outlets defined.\r\n *\r\n * ```\r\n * [{\r\n *    path: 'parent/:id',\r\n *    children: [\r\n *      { path: 'a', component: MainChild },\r\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\r\n *    ]\r\n * }]\r\n * ```\r\n *\r\n * The router merges the parameters, data, and resolve of the componentless\r\n * parent into the parameters, data, and resolve of the children.\r\n *\r\n * This is especially useful when child components are defined\r\n * with an empty path string, as in the following example.\r\n * With this configuration, navigating to '/parent/10' creates\r\n * the main child and aux components.\r\n *\r\n * ```\r\n * [{\r\n *    path: 'parent/:id',\r\n *    children: [\r\n *      { path: '', component: MainChild },\r\n *      { path: '', component: AuxChild, outlet: 'aux' }\r\n *    ]\r\n * }]\r\n * ```\r\n *\r\n * ### Lazy Loading\r\n *\r\n * Lazy loading speeds up application load time by splitting the application\r\n * into multiple bundles and loading them on demand.\r\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\r\n * instead of the `children` property.\r\n *\r\n * Given the following example route, the router will lazy load\r\n * the associated module on demand using the browser native import system.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'lazy',\r\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\r\n * }];\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface Route {\r\n    /**\r\n     * The path to match against. Cannot be used together with a custom `matcher` function.\r\n     * A URL string that uses router matching notation.\r\n     * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\r\n     * Default is \"/\" (the root path).\r\n     *\r\n     */\r\n    path?: string;\r\n    /**\r\n     * The path-matching strategy, one of 'prefix' or 'full'.\r\n     * Default is 'prefix'.\r\n     *\r\n     * By default, the router checks URL elements from the left to see if the URL\r\n     * matches a given path and stops when there is a config match. Importantly there must still be a\r\n     * config match for each segment of the URL. For example, '/team/11/user' matches the prefix\r\n     * 'team/:id' if one of the route's children matches the segment 'user'. That is, the URL\r\n     * '/team/11/user` matches the config\r\n     * `{path: 'team/:id', children: [{path: ':user', component: User}]}`\r\n     * but does not match when there are no children as in `{path: 'team/:id', component: Team}`.\r\n     *\r\n     * The path-match strategy 'full' matches against the entire URL.\r\n     * It is important to do this when redirecting empty-path routes.\r\n     * Otherwise, because an empty path is a prefix of any URL,\r\n     * the router would apply the redirect even when navigating\r\n     * to the redirect destination, creating an endless loop.\r\n     *\r\n     */\r\n    pathMatch?: string;\r\n    /**\r\n     * A custom URL-matching function. Cannot be used together with `path`.\r\n     */\r\n    matcher?: UrlMatcher;\r\n    /**\r\n     * The component to instantiate when the path matches.\r\n     * Can be empty if child routes specify components.\r\n     */\r\n    component?: Type<any>;\r\n    /**\r\n     * A URL to redirect to when the path matches.\r\n     *\r\n     * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\r\n     * Note that no further redirects are evaluated after an absolute redirect.\r\n     *\r\n     * When not present, router does not redirect.\r\n     */\r\n    redirectTo?: string;\r\n    /**\r\n     * Name of a `RouterOutlet` object where the component can be placed\r\n     * when the path matches.\r\n     */\r\n    outlet?: string;\r\n    /**\r\n     * An array of dependency-injection tokens used to look up `CanActivate()`\r\n     * handlers, in order to determine if the current user is allowed to\r\n     * activate the component. By default, any user can activate.\r\n     */\r\n    canActivate?: any[];\r\n    /**\r\n     * An array of DI tokens used to look up `CanActivateChild()` handlers,\r\n     * in order to determine if the current user is allowed to activate\r\n     * a child of the component. By default, any user can activate a child.\r\n     */\r\n    canActivateChild?: any[];\r\n    /**\r\n     * An array of DI tokens used to look up `CanDeactivate()`\r\n     * handlers, in order to determine if the current user is allowed to\r\n     * deactivate the component. By default, any user can deactivate.\r\n     *\r\n     */\r\n    canDeactivate?: any[];\r\n    /**\r\n     * An array of DI tokens used to look up `CanLoad()`\r\n     * handlers, in order to determine if the current user is allowed to\r\n     * load the component. By default, any user can load.\r\n     */\r\n    canLoad?: any[];\r\n    /**\r\n     * Additional developer-defined data provided to the component via\r\n     * `ActivatedRoute`. By default, no additional data is passed.\r\n     */\r\n    data?: Data;\r\n    /**\r\n     * A map of DI tokens used to look up data resolvers. See `Resolve`.\r\n     */\r\n    resolve?: ResolveData;\r\n    /**\r\n     * An array of child `Route` objects that specifies a nested route\r\n     * configuration.\r\n     */\r\n    children?: Routes;\r\n    /**\r\n     * An object specifying lazy-loaded child routes.\r\n     */\r\n    loadChildren?: LoadChildren;\r\n    /**\r\n     * Defines when guards and resolvers will be run. One of\r\n     * - `paramsOrQueryParamsChange` : Run when query parameters change.\r\n     * - `always` : Run on every execution.\r\n     * By default, guards and resolvers run only when the matrix\r\n     * parameters of the route change.\r\n     */\r\n    runGuardsAndResolvers?: RunGuardsAndResolvers;\r\n}\r\n\r\n/**\r\n * An event triggered when a route has been lazy loaded.\r\n *\r\n * @see `RouteConfigLoadStart`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouteConfigLoadEnd {\r\n    /** @docsNotRequired */\r\n    route: Route;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    route: Route);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered before lazy loading a route configuration.\r\n *\r\n * @see `RouteConfigLoadEnd`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouteConfigLoadStart {\r\n    /** @docsNotRequired */\r\n    route: Route;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    route: Route);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * A service that provides navigation among views and URL manipulation capabilities.\r\n *\r\n * @see `Route`.\r\n * @see [Routing and Navigation Guide](guide/router).\r\n *\r\n * @ngModule RouterModule\r\n *\r\n * @publicApi\r\n */\r\nexport declare class Router {\r\n    private rootComponentType;\r\n    private urlSerializer;\r\n    private rootContexts;\r\n    private location;\r\n    config: Routes;\r\n    /**\r\n     * Represents the activated `UrlTree` that the `Router` is configured to handle (through\r\n     * `UrlHandlingStrategy`). That is, after we find the route config tree that we're going to\r\n     * activate, run guards, and are just about to activate the route, we set the currentUrlTree.\r\n     *\r\n     * This should match the `browserUrlTree` when a navigation succeeds. If the\r\n     * `UrlHandlingStrategy.shouldProcessUrl` is `false`, only the `browserUrlTree` is updated.\r\n     */\r\n    private currentUrlTree;\r\n    /**\r\n     * Meant to represent the entire browser url after a successful navigation. In the life of a\r\n     * navigation transition:\r\n     * 1. The rawUrl represents the full URL that's being navigated to\r\n     * 2. We apply redirects, which might only apply to _part_ of the URL (due to\r\n     * `UrlHandlingStrategy`).\r\n     * 3. Right before activation (because we assume activation will succeed), we update the\r\n     * rawUrlTree to be a combination of the urlAfterRedirects (again, this might only apply to part\r\n     * of the initial url) and the rawUrl of the transition (which was the original navigation url in\r\n     * its full form).\r\n     */\r\n    private rawUrlTree;\r\n    /**\r\n     * Meant to represent the part of the browser url that the `Router` is set up to handle (via the\r\n     * `UrlHandlingStrategy`). This value is updated immediately after the browser url is updated (or\r\n     * the browser url update is skipped via `skipLocationChange`). With that, note that\r\n     * `browserUrlTree` _may not_ reflect the actual browser URL for two reasons:\r\n     *\r\n     * 1. `UrlHandlingStrategy` only handles part of the URL\r\n     * 2. `skipLocationChange` does not update the browser url.\r\n     *\r\n     * So to reiterate, `browserUrlTree` only represents the Router's internal understanding of the\r\n     * current route, either before guards with `urlUpdateStrategy === 'eager'` or right before\r\n     * activation with `'deferred'`.\r\n     *\r\n     * This should match the `currentUrlTree` when the navigation succeeds.\r\n     */\r\n    private browserUrlTree;\r\n    private readonly transitions;\r\n    private navigations;\r\n    private lastSuccessfulNavigation;\r\n    private currentNavigation;\r\n    private disposed;\r\n    private locationSubscription?;\r\n    /**\r\n     * Tracks the previously seen location change from the location subscription so we can compare\r\n     * the two latest to see if they are duplicates. See setUpLocationChangeListener.\r\n     */\r\n    private lastLocationChangeInfo;\r\n    private navigationId;\r\n    /**\r\n     * The id of the currently active page in the router.\r\n     * Updated to the transition's target id on a successful navigation.\r\n     *\r\n     * This is used to track what page the router last activated. When an attempted navigation fails,\r\n     * the router can then use this to compute how to restore the state back to the previously active\r\n     * page.\r\n     */\r\n    private currentPageId;\r\n    /**\r\n     * The ɵrouterPageId of whatever page is currently active in the browser history. This is\r\n     * important for computing the target page id for new navigations because we need to ensure each\r\n     * page id in the browser history is 1 more than the previous entry.\r\n     */\r\n    private get browserPageId();\r\n    private configLoader;\r\n    private ngModule;\r\n    private console;\r\n    private isNgZoneEnabled;\r\n    /**\r\n     * An event stream for routing events in this NgModule.\r\n     */\r\n    readonly events: Observable<Event_2>;\r\n    /**\r\n     * The current state of routing in this NgModule.\r\n     */\r\n    readonly routerState: RouterState;\r\n    /**\r\n     * A handler for navigation errors in this NgModule.\r\n     */\r\n    errorHandler: ErrorHandler;\r\n    /**\r\n     * A handler for errors thrown by `Router.parseUrl(url)`\r\n     * when `url` contains an invalid character.\r\n     * The most common case is a `%` sign\r\n     * that's not encoded and is not part of a percent encoded sequence.\r\n     */\r\n    malformedUriErrorHandler: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\r\n    /**\r\n     * True if at least one navigation event has occurred,\r\n     * false otherwise.\r\n     */\r\n    navigated: boolean;\r\n    private lastSuccessfulId;\r\n    /**\r\n     * A strategy for extracting and merging URLs.\r\n     * Used for AngularJS to Angular migrations.\r\n     */\r\n    urlHandlingStrategy: UrlHandlingStrategy;\r\n    /**\r\n     * A strategy for re-using routes.\r\n     */\r\n    routeReuseStrategy: RouteReuseStrategy;\r\n    /**\r\n     * How to handle a navigation request to the current URL. One of:\r\n     *\r\n     * - `'ignore'` :  The router ignores the request.\r\n     * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\r\n     *\r\n     * Note that this only configures whether the Route reprocesses the URL and triggers related\r\n     * action and events like redirects, guards, and resolvers. By default, the router re-uses a\r\n     * component instance when it re-navigates to the same component type without visiting a different\r\n     * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload\r\n     * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`\r\n     * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.\r\n     */\r\n    onSameUrlNavigation: 'reload' | 'ignore';\r\n    /**\r\n     * How to merge parameters, data, and resolved data from parent to child\r\n     * routes. One of:\r\n     *\r\n     * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\r\n     * for path-less or component-less routes.\r\n     * - `'always'` : Inherit parent parameters, data, and resolved data\r\n     * for all child routes.\r\n     */\r\n    paramsInheritanceStrategy: 'emptyOnly' | 'always';\r\n    /**\r\n     * Determines when the router updates the browser URL.\r\n     * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\r\n     * Set to `'eager'` to update the browser URL at the beginning of navigation.\r\n     * You can choose to update early so that, if navigation fails,\r\n     * you can show an error message with the URL that failed.\r\n     */\r\n    urlUpdateStrategy: 'deferred' | 'eager';\r\n    /**\r\n     * Enables a bug fix that corrects relative link resolution in components with empty paths.\r\n     * @see `RouterModule`\r\n     */\r\n    relativeLinkResolution: 'legacy' | 'corrected';\r\n    /**\r\n     * Creates the router service.\r\n     */\r\n    constructor(rootComponentType: Type<any> | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location_2, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes);\r\n    private setupNavigations;\r\n    private getTransition;\r\n    private setTransition;\r\n    /**\r\n     * Sets up the location change listener and performs the initial navigation.\r\n     */\r\n    initialNavigation(): void;\r\n    /**\r\n     * Sets up the location change listener. This listener detects navigations triggered from outside\r\n     * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\r\n     * navigation so that the correct events, guards, etc. are triggered.\r\n     */\r\n    setUpLocationChangeListener(): void;\r\n    /** Extracts router-related information from a `PopStateEvent`. */\r\n    private extractLocationChangeInfoFromEvent;\r\n    /**\r\n     * Determines whether two events triggered by the Location subscription are due to the same\r\n     * navigation. The location subscription can fire two events (popstate and hashchange) for a\r\n     * single navigation. The second one should be ignored, that is, we should not schedule another\r\n     * navigation in the Router.\r\n     */\r\n    private shouldScheduleNavigation;\r\n    /** The current URL. */\r\n    get url(): string;\r\n    /**\r\n     * Returns the current `Navigation` object when the router is navigating,\r\n     * and `null` when idle.\r\n     */\r\n    getCurrentNavigation(): Navigation | null;\r\n    /**\r\n     * Resets the route configuration used for navigation and generating links.\r\n     *\r\n     * @param config The route array for the new configuration.\r\n     *\r\n     * @usageNotes\r\n     *\r\n     * ```\r\n     * router.resetConfig([\r\n     *  { path: 'team/:id', component: TeamCmp, children: [\r\n     *    { path: 'simple', component: SimpleCmp },\r\n     *    { path: 'user/:name', component: UserCmp }\r\n     *  ]}\r\n     * ]);\r\n     * ```\r\n     */\r\n    resetConfig(config: Routes): void;\r\n    /** @nodoc */\r\n    ngOnDestroy(): void;\r\n    /** Disposes of the router. */\r\n    dispose(): void;\r\n    /**\r\n     * Appends URL segments to the current URL tree to create a new URL tree.\r\n     *\r\n     * @param commands An array of URL fragments with which to construct the new URL tree.\r\n     * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\r\n     * segments, followed by the parameters for each segment.\r\n     * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\r\n     * property of the options object, if supplied.\r\n     * @param navigationExtras Options that control the navigation strategy.\r\n     * @returns The new URL tree.\r\n     *\r\n     * @usageNotes\r\n     *\r\n     * ```\r\n     * // create /team/33/user/11\r\n     * router.createUrlTree(['/team', 33, 'user', 11]);\r\n     *\r\n     * // create /team/33;expand=true/user/11\r\n     * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\r\n     *\r\n     * // you can collapse static segments like this (this works only with the first passed-in value):\r\n     * router.createUrlTree(['/team/33/user', userId]);\r\n     *\r\n     * // If the first segment can contain slashes, and you do not want the router to split it,\r\n     * // you can do the following:\r\n     * router.createUrlTree([{segmentPath: '/one/two'}]);\r\n     *\r\n     * // create /team/33/(user/11//right:chat)\r\n     * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\r\n     *\r\n     * // remove the right secondary node\r\n     * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\r\n     *\r\n     * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\r\n     *\r\n     * // navigate to /team/33/user/11/details\r\n     * router.createUrlTree(['details'], {relativeTo: route});\r\n     *\r\n     * // navigate to /team/33/user/22\r\n     * router.createUrlTree(['../22'], {relativeTo: route});\r\n     *\r\n     * // navigate to /team/44/user/22\r\n     * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\r\n     *\r\n     * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\r\n     * tree should be created relative to the root.\r\n     * ```\r\n     */\r\n    createUrlTree(commands: any[], navigationExtras?: UrlCreationOptions): UrlTree;\r\n    /**\r\n     * Navigates to a view using an absolute route path.\r\n     *\r\n     * @param url An absolute path for a defined route. The function does not apply any delta to the\r\n     *     current URL.\r\n     * @param extras An object containing properties that modify the navigation strategy.\r\n     *\r\n     * @returns A Promise that resolves to 'true' when navigation succeeds,\r\n     * to 'false' when navigation fails, or is rejected on error.\r\n     *\r\n     * @usageNotes\r\n     *\r\n     * The following calls request navigation to an absolute path.\r\n     *\r\n     * ```\r\n     * router.navigateByUrl(\"/team/33/user/11\");\r\n     *\r\n     * // Navigate without updating the URL\r\n     * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\r\n     * ```\r\n     *\r\n     * @see [Routing and Navigation guide](guide/router)\r\n     *\r\n     */\r\n    navigateByUrl(url: string | UrlTree, extras?: NavigationBehaviorOptions): Promise<boolean>;\r\n    /**\r\n     * Navigate based on the provided array of commands and a starting point.\r\n     * If no starting route is provided, the navigation is absolute.\r\n     *\r\n     * @param commands An array of URL fragments with which to construct the target URL.\r\n     * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\r\n     * segments, followed by the parameters for each segment.\r\n     * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\r\n     * of the options object, if supplied.\r\n     * @param extras An options object that determines how the URL should be constructed or\r\n     *     interpreted.\r\n     *\r\n     * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\r\n     *     fails,\r\n     * or is rejected on error.\r\n     *\r\n     * @usageNotes\r\n     *\r\n     * The following calls request navigation to a dynamic route path relative to the current URL.\r\n     *\r\n     * ```\r\n     * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\r\n     *\r\n     * // Navigate without updating the URL, overriding the default behavior\r\n     * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\r\n     * ```\r\n     *\r\n     * @see [Routing and Navigation guide](guide/router)\r\n     *\r\n     */\r\n    navigate(commands: any[], extras?: NavigationExtras): Promise<boolean>;\r\n    /** Serializes a `UrlTree` into a string */\r\n    serializeUrl(url: UrlTree): string;\r\n    /** Parses a string into a `UrlTree` */\r\n    parseUrl(url: string): UrlTree;\r\n    /**\r\n     * Returns whether the url is activated.\r\n     *\r\n     * @deprecated\r\n     * Use `IsActiveMatchOptions` instead.\r\n     *\r\n     * - The equivalent `IsActiveMatchOptions` for `true` is\r\n     * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.\r\n     * - The equivalent for `false` is\r\n     * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.\r\n     */\r\n    isActive(url: string | UrlTree, exact: boolean): boolean;\r\n    /**\r\n     * Returns whether the url is activated.\r\n     */\r\n    isActive(url: string | UrlTree, matchOptions: IsActiveMatchOptions): boolean;\r\n    private removeEmptyProps;\r\n    private processNavigations;\r\n    private scheduleNavigation;\r\n    private setBrowserUrl;\r\n    /**\r\n     * Performs the necessary rollback action to restore the browser URL to the\r\n     * state before the transition.\r\n     */\r\n    private restoreHistory;\r\n    private resetState;\r\n    private resetUrlToCurrentUrlTree;\r\n    private cancelNavigationTransition;\r\n    private generateNgRouterState;\r\n}\r\n\r\n/**\r\n * A [DI token](guide/glossary/#di-token) for the router service.\r\n *\r\n * @publicApi\r\n */\r\nexport declare const ROUTER_CONFIGURATION: InjectionToken<ExtraOptions>;\r\n\r\n/**\r\n * A [DI token](guide/glossary/#di-token) for the router initializer that\r\n * is called after the app is bootstrapped.\r\n *\r\n * @publicApi\r\n */\r\nexport declare const ROUTER_INITIALIZER: InjectionToken<(compRef: ComponentRef<any>) => void>;\r\n\r\n/**\r\n * @description\r\n *\r\n * Provides a way to customize when activated routes get reused.\r\n *\r\n * @publicApi\r\n */\r\nexport declare abstract class RouteReuseStrategy {\r\n    /** Determines if this route (and its subtree) should be detached to be reused later */\r\n    abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\r\n    /**\r\n     * Stores the detached route.\r\n     *\r\n     * Storing a `null` value should erase the previously stored value.\r\n     */\r\n    abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void;\r\n    /** Determines if this route (and its subtree) should be reattached */\r\n    abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\r\n    /** Retrieves the previously stored route */\r\n    abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null;\r\n    /** Determines if a route should be reused */\r\n    abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\r\n}\r\n\r\n/**\r\n * Base for events the router goes through, as opposed to events tied to a specific\r\n * route. Fired one time for any given navigation.\r\n *\r\n * The following code shows how a class subscribes to router events.\r\n *\r\n * ```ts\r\n * import {Event, RouterEvent, Router} from '@angular/router';\r\n *\r\n * class MyService {\r\n *   constructor(public router: Router) {\r\n *     router.events.pipe(\r\n *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\r\n *     ).subscribe((e: RouterEvent) => {\r\n *       // Do something\r\n *     });\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @see `Event`\r\n * @see [Router events summary](guide/router-reference#router-events)\r\n * @publicApi\r\n */\r\nexport declare class RouterEvent {\r\n    /** A unique ID that the router assigns to every router navigation. */\r\n    id: number;\r\n    /** The URL that is the destination for this navigation. */\r\n    url: string;\r\n    constructor(\r\n    /** A unique ID that the router assigns to every router navigation. */\r\n    id: number, \r\n    /** The URL that is the destination for this navigation. */\r\n    url: string);\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * When applied to an element in a template, makes that element a link\r\n * that initiates navigation to a route. Navigation opens one or more routed components\r\n * in one or more `<router-outlet>` locations on the page.\r\n *\r\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\r\n * the following creates a static link to the route:\r\n * `<a routerLink=\"/user/bob\">link to user component</a>`\r\n *\r\n * You can use dynamic values to generate the link.\r\n * For a dynamic link, pass an array of path segments,\r\n * followed by the params for each segment.\r\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\r\n * generates a link to `/team/11/user/bob;details=true`.\r\n *\r\n * Multiple static segments can be merged into one term and combined with dynamic segements.\r\n * For example, `['/team/11/user', userName, {details: true}]`\r\n *\r\n * The input that you provide to the link is treated as a delta to the current URL.\r\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\r\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\r\n * `/user/(jim//aux:team)`.\r\n * See {@link Router#createUrlTree createUrlTree} for more information.\r\n *\r\n * @usageNotes\r\n *\r\n * You can use absolute or relative paths in a link, set query parameters,\r\n * control how parameters are handled, and keep a history of navigation states.\r\n *\r\n * ### Relative link paths\r\n *\r\n * The first segment name can be prepended with `/`, `./`, or `../`.\r\n * * If the first segment begins with `/`, the router looks up the route from the root of the\r\n *   app.\r\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\r\n *   looks in the children of the current activated route.\r\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\r\n *\r\n * ### Setting and handling query params and fragments\r\n *\r\n * The following link adds a query parameter and a fragment to the generated URL:\r\n *\r\n * ```\r\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\r\n *   link to user component\r\n * </a>\r\n * ```\r\n * By default, the directive constructs the new URL using the given query parameters.\r\n * The example generates the link: `/user/bob?debug=true#education`.\r\n *\r\n * You can instruct the directive to handle query parameters differently\r\n * by specifying the `queryParamsHandling` option in the link.\r\n * Allowed values are:\r\n *\r\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\r\n *  - `'preserve'`: Preserve the current query params.\r\n *\r\n * For example:\r\n *\r\n * ```\r\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\r\n *   link to user component\r\n * </a>\r\n * ```\r\n *\r\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\r\n *\r\n * ### Preserving navigation history\r\n *\r\n * You can provide a `state` value to be persisted to the browser's\r\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\r\n * For example:\r\n *\r\n * ```\r\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\r\n *   link to user component\r\n * </a>\r\n * ```\r\n *\r\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\r\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\r\n * event:\r\n *\r\n * ```\r\n * // Get NavigationStart events\r\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\r\n *   const navigation = router.getCurrentNavigation();\r\n *   tracingService.trace({id: navigation.extras.state.tracingId});\r\n * });\r\n * ```\r\n *\r\n * @ngModule RouterModule\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterLink implements OnChanges {\r\n    private router;\r\n    private route;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    queryParams?: Params | null;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    fragment?: string;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    queryParamsHandling?: QueryParamsHandling | null;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    preserveFragment: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    skipLocationChange: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    replaceUrl: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    state?: {\r\n        [k: string]: any;\r\n    };\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * Specify a value here when you do not want to use the default value\r\n     * for `routerLink`, which is the current activated route.\r\n     * Note that a value of `undefined` here will use the `routerLink` default.\r\n     * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    relativeTo?: ActivatedRoute | null;\r\n    private commands;\r\n    private preserve;\r\n    constructor(router: Router, route: ActivatedRoute, tabIndex: string, renderer: Renderer2, el: ElementRef);\r\n    /** @nodoc */\r\n    ngOnChanges(changes: SimpleChanges): void;\r\n    /**\r\n     * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\r\n     *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\r\n     *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\r\n     *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    set routerLink(commands: any[] | string | null | undefined);\r\n    /** @nodoc */\r\n    onClick(): boolean;\r\n    get urlTree(): UrlTree;\r\n}\r\n\r\n/**\r\n *\r\n * @description\r\n *\r\n * Tracks whether the linked route of an element is currently active, and allows you\r\n * to specify one or more CSS classes to add to the element when the linked route\r\n * is active.\r\n *\r\n * Use this directive to create a visual distinction for elements associated with an active route.\r\n * For example, the following code highlights the word \"Bob\" when the router\r\n * activates the associated route:\r\n *\r\n * ```\r\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\r\n * ```\r\n *\r\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\r\n * added to the anchor tag. If the URL changes, the class is removed.\r\n *\r\n * You can set more than one class using a space-separated string or an array.\r\n * For example:\r\n *\r\n * ```\r\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\r\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\r\n * ```\r\n *\r\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\r\n *\r\n * ```\r\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\r\n * true}\">Bob</a>\r\n * ```\r\n *\r\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\r\n * instance to a template variable.\r\n * For example, the following checks the status without assigning any CSS classes:\r\n *\r\n * ```\r\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\r\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\r\n * </a>\r\n * ```\r\n *\r\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\r\n * For example, the following sets the active-link class on the `<div>`  parent tag\r\n * when the URL is either '/user/jim' or '/user/bob'.\r\n *\r\n * ```\r\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\r\n *   <a routerLink=\"/user/jim\">Jim</a>\r\n *   <a routerLink=\"/user/bob\">Bob</a>\r\n * </div>\r\n * ```\r\n *\r\n * @ngModule RouterModule\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\r\n    private router;\r\n    private element;\r\n    private renderer;\r\n    private readonly cdr;\r\n    private link?;\r\n    private linkWithHref?;\r\n    links: QueryList<RouterLink>;\r\n    linksWithHrefs: QueryList<RouterLinkWithHref>;\r\n    private classes;\r\n    private routerEventsSubscription;\r\n    private linkInputChangesSubscription?;\r\n    readonly isActive: boolean;\r\n    /**\r\n     * Options to configure how to determine if the router link is active.\r\n     *\r\n     * These options are passed to the `Router.isActive()` function.\r\n     *\r\n     * @see Router.isActive\r\n     */\r\n    routerLinkActiveOptions: {\r\n        exact: boolean;\r\n    } | IsActiveMatchOptions;\r\n    constructor(router: Router, element: ElementRef, renderer: Renderer2, cdr: ChangeDetectorRef, link?: RouterLink | undefined, linkWithHref?: RouterLinkWithHref | undefined);\r\n    /** @nodoc */\r\n    ngAfterContentInit(): void;\r\n    private subscribeToEachLinkOnChanges;\r\n    set routerLinkActive(data: string[] | string);\r\n    /** @nodoc */\r\n    ngOnChanges(changes: SimpleChanges): void;\r\n    /** @nodoc */\r\n    ngOnDestroy(): void;\r\n    private update;\r\n    private isLinkActive;\r\n    private hasActiveLinks;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Lets you link to specific routes in your app.\r\n *\r\n * See `RouterLink` for more information.\r\n *\r\n * @ngModule RouterModule\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterLinkWithHref implements OnChanges, OnDestroy {\r\n    private router;\r\n    private route;\r\n    private locationStrategy;\r\n    target: string;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    queryParams?: Params | null;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    fragment?: string;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    queryParamsHandling?: QueryParamsHandling | null;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    preserveFragment: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    skipLocationChange: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    replaceUrl: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    state?: {\r\n        [k: string]: any;\r\n    };\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * Specify a value here when you do not want to use the default value\r\n     * for `routerLink`, which is the current activated route.\r\n     * Note that a value of `undefined` here will use the `routerLink` default.\r\n     * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    relativeTo?: ActivatedRoute | null;\r\n    private commands;\r\n    private subscription;\r\n    private preserve;\r\n    href: string;\r\n    constructor(router: Router, route: ActivatedRoute, locationStrategy: LocationStrategy);\r\n    /**\r\n     * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\r\n     *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\r\n     *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\r\n     *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    set routerLink(commands: any[] | string | null | undefined);\r\n    /** @nodoc */\r\n    ngOnChanges(changes: SimpleChanges): any;\r\n    /** @nodoc */\r\n    ngOnDestroy(): any;\r\n    /** @nodoc */\r\n    onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean;\r\n    private updateTargetUrlAndHref;\r\n    get urlTree(): UrlTree;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Adds directives and providers for in-app navigation among views defined in an application.\r\n * Use the Angular `Router` service to declaratively specify application states and manage state\r\n * transitions.\r\n *\r\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\r\n * However, only one `Router` service can be active.\r\n * To ensure this, there are two ways to register routes when importing this module:\r\n *\r\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\r\n * routes, and the `Router` service itself.\r\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\r\n * routes, but does not include the `Router` service.\r\n *\r\n * @see [Routing and Navigation guide](guide/router) for an\r\n * overview of how the `Router` service should be used.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterModule {\r\n    constructor(guard: any, router: Router);\r\n    /**\r\n     * Creates and configures a module with all the router providers and directives.\r\n     * Optionally sets up an application listener to perform an initial navigation.\r\n     *\r\n     * When registering the NgModule at the root, import as follows:\r\n     *\r\n     * ```\r\n     * @NgModule({\r\n     *   imports: [RouterModule.forRoot(ROUTES)]\r\n     * })\r\n     * class MyNgModule {}\r\n     * ```\r\n     *\r\n     * @param routes An array of `Route` objects that define the navigation paths for the application.\r\n     * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\r\n     * @return The new `NgModule`.\r\n     *\r\n     */\r\n    static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule>;\r\n    /**\r\n     * Creates a module with all the router directives and a provider registering routes,\r\n     * without creating a new Router service.\r\n     * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\r\n     *\r\n     * ```\r\n     * @NgModule({\r\n     *   imports: [RouterModule.forChild(ROUTES)]\r\n     * })\r\n     * class MyNgModule {}\r\n     * ```\r\n     *\r\n     * @param routes An array of `Route` objects that define the navigation paths for the submodule.\r\n     * @return The new NgModule.\r\n     *\r\n     */\r\n    static forChild(routes: Routes): ModuleWithProviders<RouterModule>;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\r\n *\r\n * Each outlet can have a unique name, determined by the optional `name` attribute.\r\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\r\n *\r\n * ```\r\n * <router-outlet></router-outlet>\r\n * <router-outlet name='left'></router-outlet>\r\n * <router-outlet name='right'></router-outlet>\r\n * ```\r\n *\r\n * Named outlets can be the targets of secondary routes.\r\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\r\n *\r\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\r\n *\r\n * Using named outlets and secondary routes, you can target multiple outlets in\r\n * the same `RouterLink` directive.\r\n *\r\n * The router keeps track of separate branches in a navigation tree for each named outlet and\r\n * generates a representation of that tree in the URL.\r\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\r\n * routes at the same time:\r\n *\r\n * `http://base-path/primary-route-path(outlet-name:route-path)`\r\n *\r\n * A router outlet emits an activate event when a new component is instantiated,\r\n * and a deactivate event when a component is destroyed.\r\n *\r\n * ```\r\n * <router-outlet\r\n *   (activate)='onActivate($event)'\r\n *   (deactivate)='onDeactivate($event)'></router-outlet>\r\n * ```\r\n *\r\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\r\n * outlet and secondary route configuration\").\r\n * @see `RouterLink`\r\n * @see `Route`\r\n * @ngModule RouterModule\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {\r\n    private parentContexts;\r\n    private location;\r\n    private resolver;\r\n    private changeDetector;\r\n    private activated;\r\n    private _activatedRoute;\r\n    private name;\r\n    activateEvents: EventEmitter<any>;\r\n    deactivateEvents: EventEmitter<any>;\r\n    constructor(parentContexts: ChildrenOutletContexts, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string, changeDetector: ChangeDetectorRef);\r\n    /** @nodoc */\r\n    ngOnDestroy(): void;\r\n    /** @nodoc */\r\n    ngOnInit(): void;\r\n    get isActivated(): boolean;\r\n    /**\r\n     * @returns The currently activated component instance.\r\n     * @throws An error if the outlet is not activated.\r\n     */\r\n    get component(): Object;\r\n    get activatedRoute(): ActivatedRoute;\r\n    get activatedRouteData(): Data;\r\n    /**\r\n     * Called when the `RouteReuseStrategy` instructs to detach the subtree\r\n     */\r\n    detach(): ComponentRef<any>;\r\n    /**\r\n     * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\r\n     */\r\n    attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute): void;\r\n    deactivate(): void;\r\n    activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null): void;\r\n}\r\n\r\n/**\r\n * An interface that defines the contract for developing a component outlet for the `Router`.\r\n *\r\n * An outlet acts as a placeholder that Angular dynamically fills based on the current router state.\r\n *\r\n * A router outlet should register itself with the `Router` via\r\n * `ChildrenOutletContexts#onChildOutletCreated` and unregister with\r\n * `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,\r\n * it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.\r\n *\r\n * @see `ChildrenOutletContexts`\r\n * @publicApi\r\n */\r\nexport declare interface RouterOutletContract {\r\n    /**\r\n     * Whether the given outlet is activated.\r\n     *\r\n     * An outlet is considered \"activated\" if it has an active component.\r\n     */\r\n    isActivated: boolean;\r\n    /** The instance of the activated component or `null` if the outlet is not activated. */\r\n    component: Object | null;\r\n    /**\r\n     * The `Data` of the `ActivatedRoute` snapshot.\r\n     */\r\n    activatedRouteData: Data;\r\n    /**\r\n     * The `ActivatedRoute` for the outlet or `null` if the outlet is not activated.\r\n     */\r\n    activatedRoute: ActivatedRoute | null;\r\n    /**\r\n     * Called by the `Router` when the outlet should activate (create a component).\r\n     */\r\n    activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null): void;\r\n    /**\r\n     * A request to destroy the currently activated component.\r\n     *\r\n     * When a `RouteReuseStrategy` indicates that an `ActivatedRoute` should be removed but stored for\r\n     * later re-use rather than destroyed, the `Router` will call `detach` instead.\r\n     */\r\n    deactivate(): void;\r\n    /**\r\n     * Called when the `RouteReuseStrategy` instructs to detach the subtree.\r\n     *\r\n     * This is similar to `deactivate`, but the activated component should _not_ be destroyed.\r\n     * Instead, it is returned so that it can be reattached later via the `attach` method.\r\n     */\r\n    detach(): ComponentRef<unknown>;\r\n    /**\r\n     * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree.\r\n     */\r\n    attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;\r\n    /**\r\n     * Emits an activate event when a new component is instantiated\r\n     **/\r\n    activateEvents?: EventEmitter<unknown>;\r\n    /**\r\n     * Emits a deactivate event when a component is destroyed.\r\n     */\r\n    deactivateEvents?: EventEmitter<unknown>;\r\n}\r\n\r\n/**\r\n * The preloader optimistically loads all router configurations to\r\n * make navigations into lazily-loaded sections of the application faster.\r\n *\r\n * The preloader runs in the background. When the router bootstraps, the preloader\r\n * starts listening to all navigation events. After every such event, the preloader\r\n * will check if any configurations can be loaded lazily.\r\n *\r\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterPreloader implements OnDestroy {\r\n    private router;\r\n    private injector;\r\n    private preloadingStrategy;\r\n    private loader;\r\n    private subscription?;\r\n    constructor(router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, preloadingStrategy: PreloadingStrategy);\r\n    setUpPreloading(): void;\r\n    preload(): Observable<any>;\r\n    /** @nodoc */\r\n    ngOnDestroy(): void;\r\n    private processRoutes;\r\n    private preloadConfig;\r\n}\r\n\r\n/**\r\n * Represents the state of the router as a tree of activated routes.\r\n *\r\n * @usageNotes\r\n *\r\n * Every node in the route tree is an `ActivatedRoute` instance\r\n * that knows about the \"consumed\" URL segments, the extracted parameters,\r\n * and the resolved data.\r\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\r\n *\r\n * The following fragment shows how a component gets the root node\r\n * of the current state to establish its own route tree:\r\n *\r\n * ```\r\n * @Component({templateUrl:'template.html'})\r\n * class MyComponent {\r\n *   constructor(router: Router) {\r\n *     const state: RouterState = router.routerState;\r\n *     const root: ActivatedRoute = state.root;\r\n *     const child = root.firstChild;\r\n *     const id: Observable<string> = child.params.map(p => p.id);\r\n *     //...\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @see `ActivatedRoute`\r\n * @see [Getting route information](guide/router#getting-route-information)\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterState extends ɵangular_packages_router_router_m<ActivatedRoute> {\r\n    /** The current snapshot of the router state */\r\n    snapshot: RouterStateSnapshot;\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Represents the state of the router at a moment in time.\r\n *\r\n * This is a tree of activated route snapshots. Every node in this tree knows about\r\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\r\n *\r\n * The following example shows how a component is initialized with information\r\n * from the snapshot of the root node's state at the time of creation.\r\n *\r\n * ```\r\n * @Component({templateUrl:'template.html'})\r\n * class MyComponent {\r\n *   constructor(router: Router) {\r\n *     const state: RouterState = router.routerState;\r\n *     const snapshot: RouterStateSnapshot = state.snapshot;\r\n *     const root: ActivatedRouteSnapshot = snapshot.root;\r\n *     const child = root.firstChild;\r\n *     const id: Observable<string> = child.params.map(p => p.id);\r\n *     //...\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterStateSnapshot extends ɵangular_packages_router_router_m<ActivatedRouteSnapshot> {\r\n    /** The url from which this snapshot was created */\r\n    url: string;\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * The [DI token](guide/glossary/#di-token) for a router configuration.\r\n *\r\n * `ROUTES` is a low level API for router configuration via dependency injection.\r\n *\r\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\r\n * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.\r\n *\r\n * @publicApi\r\n */\r\nexport declare const ROUTES: InjectionToken<Route[][]>;\r\n\r\n/**\r\n * Represents a route configuration for the Router service.\r\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\r\n * in `Route.children`.\r\n *\r\n * @see `Route`\r\n * @see `Router`\r\n * @see [Router configuration guide](guide/router-reference#configuration)\r\n * @publicApi\r\n */\r\nexport declare type Routes = Route[];\r\n\r\n/**\r\n * An event triggered when routes are recognized.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RoutesRecognized extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string, \r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot);\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n *\r\n * A policy for when to run guards and resolvers on a route.\r\n *\r\n * @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)\r\n * @publicApi\r\n */\r\nexport declare type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' | 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' | ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\r\n\r\n/**\r\n * An event triggered by scrolling.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class Scroll {\r\n    /** @docsNotRequired */\r\n    readonly routerEvent: NavigationEnd;\r\n    /** @docsNotRequired */\r\n    readonly position: [number, number] | null;\r\n    /** @docsNotRequired */\r\n    readonly anchor: string | null;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    routerEvent: NavigationEnd, \r\n    /** @docsNotRequired */\r\n    position: [number, number] | null, \r\n    /** @docsNotRequired */\r\n    anchor: string | null);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Options that modify the `Router` URL.\r\n * Supply an object containing any of these properties to a `Router` navigation function to\r\n * control how the target URL should be constructed.\r\n *\r\n * @see [Router.navigate() method](api/router/Router#navigate)\r\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\r\n * @see [Routing and Navigation guide](guide/router)\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface UrlCreationOptions {\r\n    /**\r\n     * Specifies a root URI to use for relative navigation.\r\n     *\r\n     * For example, consider the following route configuration where the parent route\r\n     * has two children.\r\n     *\r\n     * ```\r\n     * [{\r\n     *   path: 'parent',\r\n     *   component: ParentComponent,\r\n     *   children: [{\r\n     *     path: 'list',\r\n     *     component: ListComponent\r\n     *   },{\r\n     *     path: 'child',\r\n     *     component: ChildComponent\r\n     *   }]\r\n     * }]\r\n     * ```\r\n     *\r\n     * The following `go()` function navigates to the `list` route by\r\n     * interpreting the destination URI as relative to the activated `child`  route\r\n     *\r\n     * ```\r\n     *  @Component({...})\r\n     *  class ChildComponent {\r\n     *    constructor(private router: Router, private route: ActivatedRoute) {}\r\n     *\r\n     *    go() {\r\n     *      this.router.navigate(['../list'], { relativeTo: this.route });\r\n     *    }\r\n     *  }\r\n     * ```\r\n     *\r\n     * A value of `null` or `undefined` indicates that the navigation commands should be applied\r\n     * relative to the root.\r\n     */\r\n    relativeTo?: ActivatedRoute | null;\r\n    /**\r\n     * Sets query parameters to the URL.\r\n     *\r\n     * ```\r\n     * // Navigate to /results?page=1\r\n     * this.router.navigate(['/results'], { queryParams: { page: 1 } });\r\n     * ```\r\n     */\r\n    queryParams?: Params | null;\r\n    /**\r\n     * Sets the hash fragment for the URL.\r\n     *\r\n     * ```\r\n     * // Navigate to /results#top\r\n     * this.router.navigate(['/results'], { fragment: 'top' });\r\n     * ```\r\n     */\r\n    fragment?: string;\r\n    /**\r\n     * How to handle query parameters in the router link for the next navigation.\r\n     * One of:\r\n     * * `preserve` : Preserve current parameters.\r\n     * * `merge` : Merge new with current parameters.\r\n     *\r\n     * The \"preserve\" option discards any new query params:\r\n     * ```\r\n     * // from /view1?page=1 to/view2?page=1\r\n     * this.router.navigate(['/view2'], { queryParams: { page: 2 },  queryParamsHandling: \"preserve\"\r\n     * });\r\n     * ```\r\n     * The \"merge\" option appends new query params to the params from the current URL:\r\n     * ```\r\n     * // from /view1?page=1 to/view2?page=1&otherKey=2\r\n     * this.router.navigate(['/view2'], { queryParams: { otherKey: 2 },  queryParamsHandling: \"merge\"\r\n     * });\r\n     * ```\r\n     * In case of a key collision between current parameters and those in the `queryParams` object,\r\n     * the new value is used.\r\n     *\r\n     */\r\n    queryParamsHandling?: QueryParamsHandling | null;\r\n    /**\r\n     * When true, preserves the URL fragment for the next navigation\r\n     *\r\n     * ```\r\n     * // Preserve fragment from /results#top to /view#top\r\n     * this.router.navigate(['/view'], { preserveFragment: true });\r\n     * ```\r\n     */\r\n    preserveFragment?: boolean;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Provides a way to migrate AngularJS applications to Angular.\r\n *\r\n * @publicApi\r\n */\r\nexport declare abstract class UrlHandlingStrategy {\r\n    /**\r\n     * Tells the router if this URL should be processed.\r\n     *\r\n     * When it returns true, the router will execute the regular navigation.\r\n     * When it returns false, the router will set the router state to an empty state.\r\n     * As a result, all the active components will be destroyed.\r\n     *\r\n     */\r\n    abstract shouldProcessUrl(url: UrlTree): boolean;\r\n    /**\r\n     * Extracts the part of the URL that should be handled by the router.\r\n     * The rest of the URL will remain untouched.\r\n     */\r\n    abstract extract(url: UrlTree): UrlTree;\r\n    /**\r\n     * Merges the URL fragment with the rest of the URL.\r\n     */\r\n    abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\r\n}\r\n\r\n/**\r\n * A function for matching a route against URLs. Implement a custom URL matcher\r\n * for `Route.matcher` when a combination of `path` and `pathMatch`\r\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\r\n *\r\n * The function takes the following arguments and returns a `UrlMatchResult` object.\r\n * * *segments* : An array of URL segments.\r\n * * *group* : A segment group.\r\n * * *route* : The route to match against.\r\n *\r\n * The following example implementation matches HTML files.\r\n *\r\n * ```\r\n * export function htmlFiles(url: UrlSegment[]) {\r\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\r\n * }\r\n *\r\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult | null;\r\n\r\n/**\r\n * Represents the result of matching URLs with a custom matching function.\r\n *\r\n * * `consumed` is an array of the consumed URL segments.\r\n * * `posParams` is a map of positional parameters.\r\n *\r\n * @see `UrlMatcher()`\r\n * @publicApi\r\n */\r\nexport declare type UrlMatchResult = {\r\n    consumed: UrlSegment[];\r\n    posParams?: {\r\n        [name: string]: UrlSegment;\r\n    };\r\n};\r\n\r\n/**\r\n * @description\r\n *\r\n * Represents a single URL segment.\r\n *\r\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\r\n * parameters associated with the segment.\r\n *\r\n * @usageNotes\r\n * ### Example\r\n *\r\n * ```\r\n * @Component({templateUrl:'template.html'})\r\n * class MyComponent {\r\n *   constructor(router: Router) {\r\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\r\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\r\n *     const s: UrlSegment[] = g.segments;\r\n *     s[0].path; // returns 'team'\r\n *     s[0].parameters; // returns {id: 33}\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class UrlSegment {\r\n    /** The path part of a URL segment */\r\n    path: string;\r\n    /** The matrix parameters associated with a segment */\r\n    parameters: {\r\n        [name: string]: string;\r\n    };\r\n    constructor(\r\n    /** The path part of a URL segment */\r\n    path: string, \r\n    /** The matrix parameters associated with a segment */\r\n    parameters: {\r\n        [name: string]: string;\r\n    });\r\n    get parameterMap(): ParamMap;\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Represents the parsed URL segment group.\r\n *\r\n * See `UrlTree` for more information.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class UrlSegmentGroup {\r\n    /** The URL segments of this group. See `UrlSegment` for more information */\r\n    segments: UrlSegment[];\r\n    /** The list of children of this group */\r\n    children: {\r\n        [key: string]: UrlSegmentGroup;\r\n    };\r\n    /** The parent node in the url tree */\r\n    parent: UrlSegmentGroup | null;\r\n    constructor(\r\n    /** The URL segments of this group. See `UrlSegment` for more information */\r\n    segments: UrlSegment[], \r\n    /** The list of children of this group */\r\n    children: {\r\n        [key: string]: UrlSegmentGroup;\r\n    });\r\n    /** Whether the segment has child segments */\r\n    hasChildren(): boolean;\r\n    /** Number of child segments */\r\n    get numberOfChildren(): number;\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Serializes and deserializes a URL string into a URL tree.\r\n *\r\n * The url serialization strategy is customizable. You can\r\n * make all URLs case insensitive by providing a custom UrlSerializer.\r\n *\r\n * See `DefaultUrlSerializer` for an example of a URL serializer.\r\n *\r\n * @publicApi\r\n */\r\nexport declare abstract class UrlSerializer {\r\n    /** Parse a url into a `UrlTree` */\r\n    abstract parse(url: string): UrlTree;\r\n    /** Converts a `UrlTree` into a url */\r\n    abstract serialize(tree: UrlTree): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Represents the parsed URL.\r\n *\r\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\r\n * serialized tree.\r\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\r\n *\r\n * @usageNotes\r\n * ### Example\r\n *\r\n * ```\r\n * @Component({templateUrl:'template.html'})\r\n * class MyComponent {\r\n *   constructor(router: Router) {\r\n *     const tree: UrlTree =\r\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\r\n *     const f = tree.fragment; // return 'fragment'\r\n *     const q = tree.queryParams; // returns {debug: 'true'}\r\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\r\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\r\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\r\n *     g.children['support'].segments; // return 1 segment 'help'\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class UrlTree {\r\n    /** The root segment group of the URL tree */\r\n    root: UrlSegmentGroup;\r\n    /** The query params of the URL */\r\n    queryParams: Params;\r\n    /** The fragment of the URL */\r\n    fragment: string | null;\r\n    get queryParamMap(): ParamMap;\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @publicApi\r\n */\r\nexport declare const VERSION: Version;\r\n\r\n/**\r\n * @docsNotRequired\r\n */\r\nexport declare const ɵangular_packages_router_router_a: InjectionToken<void>;\r\n\r\nexport declare function ɵangular_packages_router_router_b(): NgProbeToken;\r\n\r\nexport declare function ɵangular_packages_router_router_c(router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): ɵangular_packages_router_router_o;\r\n\r\nexport declare function ɵangular_packages_router_router_d(platformLocationStrategy: PlatformLocation, baseHref: string, options?: ExtraOptions): HashLocationStrategy | PathLocationStrategy;\r\n\r\nexport declare function ɵangular_packages_router_router_e(router: Router): any;\r\n\r\nexport declare function ɵangular_packages_router_router_f(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location_2, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][], opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy, routeReuseStrategy?: RouteReuseStrategy): Router;\r\n\r\nexport declare function ɵangular_packages_router_router_g(router: Router): ActivatedRoute;\r\n\r\n/**\r\n * Router initialization requires two steps:\r\n *\r\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\r\n * a resolver or a guard executes asynchronously.\r\n *\r\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\r\n * `afterPreactivation` hook provided by the router.\r\n * The router navigation starts, reaches the point when preactivation is done, and then\r\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\r\n */\r\nexport declare class ɵangular_packages_router_router_h implements OnDestroy {\r\n    private injector;\r\n    private initNavigation;\r\n    private destroyed;\r\n    private resultOfPreactivationDone;\r\n    constructor(injector: Injector);\r\n    appInitializer(): Promise<any>;\r\n    bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void;\r\n    ngOnDestroy(): void;\r\n}\r\n\r\nexport declare function ɵangular_packages_router_router_i(r: ɵangular_packages_router_router_h): () => Promise<any>;\r\n\r\nexport declare function ɵangular_packages_router_router_j(r: ɵangular_packages_router_router_h): (bootstrappedComponentRef: ComponentRef<any>) => void;\r\n\r\nexport declare function ɵangular_packages_router_router_k(): ReadonlyArray<Provider>;\r\n\r\n\r\nexport declare class ɵangular_packages_router_router_m<T> {\r\n    constructor(root: ɵangular_packages_router_router_n<T>);\r\n    get root(): T;\r\n}\r\n\r\nexport declare class ɵangular_packages_router_router_n<T> {\r\n    value: T;\r\n    children: ɵangular_packages_router_router_n<T>[];\r\n    constructor(value: T, children: ɵangular_packages_router_router_n<T>[]);\r\n    toString(): string;\r\n}\r\n\r\nexport declare class ɵangular_packages_router_router_o implements OnDestroy {\r\n    private router;\r\n    /** @docsNotRequired */ readonly viewportScroller: ViewportScroller;\r\n    private options;\r\n    private routerEventsSubscription;\r\n    private scrollEventsSubscription;\r\n    private lastId;\r\n    private lastSource;\r\n    private restoredId;\r\n    private store;\r\n    constructor(router: Router, \r\n    /** @docsNotRequired */ viewportScroller: ViewportScroller, options?: {\r\n        scrollPositionRestoration?: 'disabled' | 'enabled' | 'top';\r\n        anchorScrolling?: 'disabled' | 'enabled';\r\n    });\r\n    init(): void;\r\n    private createScrollEvents;\r\n    private consumeScrollEvents;\r\n    private scheduleScrollEvent;\r\n    /** @nodoc */\r\n    ngOnDestroy(): void;\r\n}\r\n\r\nexport declare function ɵassignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void;\r\n\r\n\r\n/**\r\n * This component is used internally within the router to be a placeholder when an empty\r\n * router-outlet is needed. For example, with a config such as:\r\n *\r\n * `{path: 'parent', outlet: 'nav', children: [...]}`\r\n *\r\n * In order to render, there needs to be a component on this config, which will default\r\n * to this `EmptyOutletComponent`.\r\n */\r\ndeclare class ɵEmptyOutletComponent {\r\n}\r\nexport { ɵEmptyOutletComponent }\r\nexport { ɵEmptyOutletComponent as ɵangular_packages_router_router_l }\r\n\r\n/**\r\n * Flattens single-level nested arrays.\r\n */\r\nexport declare function ɵflatten<T>(arr: T[][]): T[];\r\n\r\nexport declare const ɵROUTER_PROVIDERS: Provider[];\r\n\r\nexport { }\r\n"]}
+{"version":3,"file":"router.d.ts","sources":["router.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":["/**\n * @license Angular v12.2.13\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { AfterContentInit } from '@angular/core';\r\nimport { ChangeDetectorRef } from '@angular/core';\r\nimport { Compiler } from '@angular/core';\r\nimport { ComponentFactoryResolver } from '@angular/core';\r\nimport { ComponentRef } from '@angular/core';\r\nimport { ElementRef } from '@angular/core';\r\nimport { EventEmitter } from '@angular/core';\r\nimport { HashLocationStrategy } from '@angular/common';\r\nimport { InjectionToken } from '@angular/core';\r\nimport { Injector } from '@angular/core';\r\nimport { Location as Location_2 } from '@angular/common';\r\nimport { LocationStrategy } from '@angular/common';\r\nimport { ModuleWithProviders } from '@angular/core';\r\nimport { NgModuleFactory } from '@angular/core';\r\nimport { NgModuleFactoryLoader } from '@angular/core';\r\nimport { NgProbeToken } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { OnChanges } from '@angular/core';\r\nimport { OnDestroy } from '@angular/core';\r\nimport { OnInit } from '@angular/core';\r\nimport { PathLocationStrategy } from '@angular/common';\r\nimport { PlatformLocation } from '@angular/common';\r\nimport { Provider } from '@angular/core';\r\nimport { QueryList } from '@angular/core';\r\nimport { Renderer2 } from '@angular/core';\r\nimport { SimpleChanges } from '@angular/core';\r\nimport { Type } from '@angular/core';\r\nimport { Version } from '@angular/core';\r\nimport { ViewContainerRef } from '@angular/core';\r\nimport { ViewportScroller } from '@angular/common';\r\n\r\n/**\r\n * Provides access to information about a route associated with a component\r\n * that is loaded in an outlet.\r\n * Use to traverse the `RouterState` tree and extract information from nodes.\r\n *\r\n * The following example shows how to construct a component using information from a\r\n * currently activated route.\r\n *\r\n * Note: the observables in this class only emit when the current and previous values differ based\r\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\r\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\r\n *\r\n * {@example router/activated-route/module.ts region=\"activated-route\"\r\n *     header=\"activated-route.component.ts\"}\r\n *\r\n * @see [Getting route information](guide/router#getting-route-information)\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ActivatedRoute {\r\n    /** An observable of the URL segments matched by this route. */\r\n    url: Observable<UrlSegment[]>;\r\n    /** An observable of the matrix parameters scoped to this route. */\r\n    params: Observable<Params>;\r\n    /** An observable of the query parameters shared by all the routes. */\r\n    queryParams: Observable<Params>;\r\n    /** An observable of the URL fragment shared by all the routes. */\r\n    fragment: Observable<string | null>;\r\n    /** An observable of the static and resolved data of this route. */\r\n    data: Observable<Data>;\r\n    /** The outlet name of the route, a constant. */\r\n    outlet: string;\r\n    /** The component of the route, a constant. */\r\n    component: Type<any> | string | null;\r\n    /** The current snapshot of this route */\r\n    snapshot: ActivatedRouteSnapshot;\r\n    /** The configuration used to match this route. */\r\n    get routeConfig(): Route | null;\r\n    /** The root of the router state. */\r\n    get root(): ActivatedRoute;\r\n    /** The parent of this route in the router state tree. */\r\n    get parent(): ActivatedRoute | null;\r\n    /** The first child of this route in the router state tree. */\r\n    get firstChild(): ActivatedRoute | null;\r\n    /** The children of this route in the router state tree. */\r\n    get children(): ActivatedRoute[];\r\n    /** The path from the root of the router state tree to this route. */\r\n    get pathFromRoot(): ActivatedRoute[];\r\n    /**\r\n     * An Observable that contains a map of the required and optional parameters\r\n     * specific to the route.\r\n     * The map supports retrieving single and multiple values from the same parameter.\r\n     */\r\n    get paramMap(): Observable<ParamMap>;\r\n    /**\r\n     * An Observable that contains a map of the query parameters available to all routes.\r\n     * The map supports retrieving single and multiple values from the query parameter.\r\n     */\r\n    get queryParamMap(): Observable<ParamMap>;\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Contains the information about a route associated with a component loaded in an\r\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\r\n * traverse the router state tree.\r\n *\r\n * The following example initializes a component with route information extracted\r\n * from the snapshot of the root node at the time of creation.\r\n *\r\n * ```\r\n * @Component({templateUrl:'./my-component.html'})\r\n * class MyComponent {\r\n *   constructor(route: ActivatedRoute) {\r\n *     const id: string = route.snapshot.params.id;\r\n *     const url: string = route.snapshot.url.join('');\r\n *     const user = route.snapshot.data.user;\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ActivatedRouteSnapshot {\r\n    /** The URL segments matched by this route */\r\n    url: UrlSegment[];\r\n    /**\r\n     *  The matrix parameters scoped to this route.\r\n     *\r\n     *  You can compute all params (or data) in the router state or to get params outside\r\n     *  of an activated component by traversing the `RouterState` tree as in the following\r\n     *  example:\r\n     *  ```\r\n     *  collectRouteParams(router: Router) {\r\n     *    let params = {};\r\n     *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\r\n     *    while (stack.length > 0) {\r\n     *      const route = stack.pop()!;\r\n     *      params = {...params, ...route.params};\r\n     *      stack.push(...route.children);\r\n     *    }\r\n     *    return params;\r\n     *  }\r\n     *  ```\r\n     */\r\n    params: Params;\r\n    /** The query parameters shared by all the routes */\r\n    queryParams: Params;\r\n    /** The URL fragment shared by all the routes */\r\n    fragment: string | null;\r\n    /** The static and resolved data of this route */\r\n    data: Data;\r\n    /** The outlet name of the route */\r\n    outlet: string;\r\n    /** The component of the route */\r\n    component: Type<any> | string | null;\r\n    /** The configuration used to match this route **/\r\n    readonly routeConfig: Route | null;\r\n    /** The root of the router state */\r\n    get root(): ActivatedRouteSnapshot;\r\n    /** The parent of this route in the router state tree */\r\n    get parent(): ActivatedRouteSnapshot | null;\r\n    /** The first child of this route in the router state tree */\r\n    get firstChild(): ActivatedRouteSnapshot | null;\r\n    /** The children of this route in the router state tree */\r\n    get children(): ActivatedRouteSnapshot[];\r\n    /** The path from the root of the router state tree to this route */\r\n    get pathFromRoot(): ActivatedRouteSnapshot[];\r\n    get paramMap(): ParamMap;\r\n    get queryParamMap(): ParamMap;\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered at the end of the activation part\r\n * of the Resolve phase of routing.\r\n * @see `ActivationStart`\r\n * @see `ResolveStart`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ActivationEnd {\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered at the start of the activation part\r\n * of the Resolve phase of routing.\r\n * @see `ActivationEnd`\r\n * @see `ResolveStart`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ActivationStart {\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * This base route reuse strategy only reuses routes when the matched router configs are\r\n * identical. This prevents components from being destroyed and recreated\r\n * when just the fragment or query parameters change\r\n * (that is, the existing component is _reused_).\r\n *\r\n * This strategy does not store any routes for later reuse.\r\n *\r\n * Angular uses this strategy by default.\r\n *\r\n *\r\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\r\n * class that extends the `BaseRouteReuseStrategy` one.\r\n * @publicApi\r\n */\r\nexport declare abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\r\n    /**\r\n     * Whether the given route should detach for later reuse.\r\n     * Always returns false for `BaseRouteReuseStrategy`.\r\n     * */\r\n    shouldDetach(route: ActivatedRouteSnapshot): boolean;\r\n    /**\r\n     * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\r\n     */\r\n    store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void;\r\n    /** Returns `false`, meaning the route (and its subtree) is never reattached */\r\n    shouldAttach(route: ActivatedRouteSnapshot): boolean;\r\n    /** Returns `null` because this strategy does not store routes for later re-use. */\r\n    retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null;\r\n    /**\r\n     * Determines if a route should be reused.\r\n     * This strategy returns `true` when the future route config and current route config are\r\n     * identical.\r\n     */\r\n    shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Interface that a class can implement to be a guard deciding if a route can be activated.\r\n * If all guards return `true`, navigation continues. If any guard returns `false`,\r\n * navigation is cancelled. If any guard returns a `UrlTree`, the current navigation\r\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\r\n *\r\n * The following example implements a `CanActivate` function that checks whether the\r\n * current user has permission to activate the requested route.\r\n *\r\n * ```\r\n * class UserToken {}\r\n * class Permissions {\r\n *   canActivate(user: UserToken, id: string): boolean {\r\n *     return true;\r\n *   }\r\n * }\r\n *\r\n * @Injectable()\r\n * class CanActivateTeam implements CanActivate {\r\n *   constructor(private permissions: Permissions, private currentUser: UserToken) {}\r\n *\r\n *   canActivate(\r\n *     route: ActivatedRouteSnapshot,\r\n *     state: RouterStateSnapshot\r\n *   ): Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree {\r\n *     return this.permissions.canActivate(this.currentUser, route.params.id);\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * Here, the defined guard function is provided as part of the `Route` object\r\n * in the router configuration:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         canActivate: [CanActivateTeam]\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [CanActivateTeam, UserToken, Permissions]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * You can alternatively provide an in-line function with the `canActivate` signature:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         canActivate: ['canActivateTeam']\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [\r\n *     {\r\n *       provide: 'canActivateTeam',\r\n *       useValue: (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => true\r\n *     }\r\n *   ]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface CanActivate {\r\n    canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Interface that a class can implement to be a guard deciding if a child route can be activated.\r\n * If all guards return `true`, navigation continues. If any guard returns `false`,\r\n * navigation is cancelled. If any guard returns a `UrlTree`, current navigation\r\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\r\n *\r\n * The following example implements a `CanActivateChild` function that checks whether the\r\n * current user has permission to activate the requested child route.\r\n *\r\n * ```\r\n * class UserToken {}\r\n * class Permissions {\r\n *   canActivate(user: UserToken, id: string): boolean {\r\n *     return true;\r\n *   }\r\n * }\r\n *\r\n * @Injectable()\r\n * class CanActivateTeam implements CanActivateChild {\r\n *   constructor(private permissions: Permissions, private currentUser: UserToken) {}\r\n *\r\n *   canActivateChild(\r\n *     route: ActivatedRouteSnapshot,\r\n *     state: RouterStateSnapshot\r\n *   ): Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree {\r\n *     return this.permissions.canActivate(this.currentUser, route.params.id);\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * Here, the defined guard function is provided as part of the `Route` object\r\n * in the router configuration:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'root',\r\n *         canActivateChild: [CanActivateTeam],\r\n *         children: [\r\n *           {\r\n *              path: 'team/:id',\r\n *              component: TeamComponent\r\n *           }\r\n *         ]\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [CanActivateTeam, UserToken, Permissions]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * You can alternatively provide an in-line function with the `canActivateChild` signature:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'root',\r\n *         canActivateChild: ['canActivateTeam'],\r\n *         children: [\r\n *           {\r\n *             path: 'team/:id',\r\n *             component: TeamComponent\r\n *           }\r\n *         ]\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [\r\n *     {\r\n *       provide: 'canActivateTeam',\r\n *       useValue: (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => true\r\n *     }\r\n *   ]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface CanActivateChild {\r\n    canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Interface that a class can implement to be a guard deciding if a route can be deactivated.\r\n * If all guards return `true`, navigation continues. If any guard returns `false`,\r\n * navigation is cancelled. If any guard returns a `UrlTree`, current navigation\r\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\r\n *\r\n * The following example implements a `CanDeactivate` function that checks whether the\r\n * current user has permission to deactivate the requested route.\r\n *\r\n * ```\r\n * class UserToken {}\r\n * class Permissions {\r\n *   canDeactivate(user: UserToken, id: string): boolean {\r\n *     return true;\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * Here, the defined guard function is provided as part of the `Route` object\r\n * in the router configuration:\r\n *\r\n * ```\r\n *\r\n * @Injectable()\r\n * class CanDeactivateTeam implements CanDeactivate<TeamComponent> {\r\n *   constructor(private permissions: Permissions, private currentUser: UserToken) {}\r\n *\r\n *   canDeactivate(\r\n *     component: TeamComponent,\r\n *     currentRoute: ActivatedRouteSnapshot,\r\n *     currentState: RouterStateSnapshot,\r\n *     nextState: RouterStateSnapshot\r\n *   ): Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree {\r\n *     return this.permissions.canDeactivate(this.currentUser, route.params.id);\r\n *   }\r\n * }\r\n *\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         canDeactivate: [CanDeactivateTeam]\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [CanDeactivateTeam, UserToken, Permissions]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * You can alternatively provide an in-line function with the `canDeactivate` signature:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         canDeactivate: ['canDeactivateTeam']\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [\r\n *     {\r\n *       provide: 'canDeactivateTeam',\r\n *       useValue: (component: TeamComponent, currentRoute: ActivatedRouteSnapshot, currentState:\r\n * RouterStateSnapshot, nextState: RouterStateSnapshot) => true\r\n *     }\r\n *   ]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface CanDeactivate<T> {\r\n    canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Interface that a class can implement to be a guard deciding if children can be loaded.\r\n * If all guards return `true`, navigation continues. If any guard returns `false`,\r\n * navigation is cancelled. If any guard returns a `UrlTree`, current navigation\r\n * is cancelled and a new navigation starts to the `UrlTree` returned from the guard.\r\n *\r\n * The following example implements a `CanLoad` function that decides whether the\r\n * current user has permission to load requested child routes.\r\n *\r\n *\r\n * ```\r\n * class UserToken {}\r\n * class Permissions {\r\n *   canLoadChildren(user: UserToken, id: string, segments: UrlSegment[]): boolean {\r\n *     return true;\r\n *   }\r\n * }\r\n *\r\n * @Injectable()\r\n * class CanLoadTeamSection implements CanLoad {\r\n *   constructor(private permissions: Permissions, private currentUser: UserToken) {}\r\n *\r\n *   canLoad(route: Route, segments: UrlSegment[]): Observable<boolean>|Promise<boolean>|boolean {\r\n *     return this.permissions.canLoadChildren(this.currentUser, route, segments);\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * Here, the defined guard function is provided as part of the `Route` object\r\n * in the router configuration:\r\n *\r\n * ```\r\n *\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         loadChildren: 'team.js',\r\n *         canLoad: [CanLoadTeamSection]\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [CanLoadTeamSection, UserToken, Permissions]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * You can alternatively provide an in-line function with the `canLoad` signature:\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'team/:id',\r\n *         component: TeamComponent,\r\n *         loadChildren: 'team.js',\r\n *         canLoad: ['canLoadTeamSection']\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [\r\n *     {\r\n *       provide: 'canLoadTeamSection',\r\n *       useValue: (route: Route, segments: UrlSegment[]) => true\r\n *     }\r\n *   ]\r\n * })\r\n * class AppModule {}\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface CanLoad {\r\n    canLoad(route: Route, segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;\r\n}\r\n\r\n/**\r\n * An event triggered at the end of the child-activation part\r\n * of the Resolve phase of routing.\r\n * @see `ChildActivationStart`\r\n * @see `ResolveStart`\r\n * @publicApi\r\n */\r\nexport declare class ChildActivationEnd {\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered at the start of the child-activation\r\n * part of the Resolve phase of routing.\r\n * @see  `ChildActivationEnd`\r\n * @see `ResolveStart`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ChildActivationStart {\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    snapshot: ActivatedRouteSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * Store contextual information about the children (= nested) `RouterOutlet`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ChildrenOutletContexts {\r\n    private contexts;\r\n    /** Called when a `RouterOutlet` directive is instantiated */\r\n    onChildOutletCreated(childName: string, outlet: RouterOutletContract): void;\r\n    /**\r\n     * Called when a `RouterOutlet` directive is destroyed.\r\n     * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\r\n     * re-created later.\r\n     */\r\n    onChildOutletDestroyed(childName: string): void;\r\n    /**\r\n     * Called when the corresponding route is deactivated during navigation.\r\n     * Because the component get destroyed, all children outlet are destroyed.\r\n     */\r\n    onOutletDeactivated(): Map<string, OutletContext>;\r\n    onOutletReAttached(contexts: Map<string, OutletContext>): void;\r\n    getOrCreateContext(childName: string): OutletContext;\r\n    getContext(childName: string): OutletContext | null;\r\n}\r\n\r\n/**\r\n * Converts a `Params` instance to a `ParamMap`.\r\n * @param params The instance to convert.\r\n * @returns The new map instance.\r\n *\r\n * @publicApi\r\n */\r\nexport declare function convertToParamMap(params: Params): ParamMap;\r\n\r\n/**\r\n *\r\n * Represents static data associated with a particular route.\r\n *\r\n * @see `Route#data`\r\n *\r\n * @publicApi\r\n */\r\nexport declare type Data = {\r\n    [name: string]: any;\r\n};\r\n\r\n/**\r\n * @description\r\n *\r\n * A default implementation of the `UrlSerializer`.\r\n *\r\n * Example URLs:\r\n *\r\n * ```\r\n * /inbox/33(popup:compose)\r\n * /inbox/33;open=true/messages/44\r\n * ```\r\n *\r\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\r\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\r\n * specify route specific parameters.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class DefaultUrlSerializer implements UrlSerializer {\r\n    /** Parses a url into a `UrlTree` */\r\n    parse(url: string): UrlTree;\r\n    /** Converts a `UrlTree` into a url */\r\n    serialize(tree: UrlTree): string;\r\n}\r\n\r\n/**\r\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\r\n *\r\n * @see `loadChildrenCallback`\r\n * @publicApi\r\n * @deprecated The `string` form of `loadChildren` is deprecated in favor of the\r\n * `LoadChildrenCallback` function which uses the ES dynamic `import()` expression.\r\n * This offers a more natural and standards-based mechanism to dynamically\r\n * load an ES module at runtime.\r\n */\r\nexport declare type DeprecatedLoadChildren = string;\r\n\r\n/**\r\n * @description\r\n *\r\n * Represents the detached route tree.\r\n *\r\n * This is an opaque value the router will give to a custom route reuse strategy\r\n * to store and retrieve later on.\r\n *\r\n * @publicApi\r\n */\r\nexport declare type DetachedRouteHandle = {};\r\n\r\n/**\r\n * Error handler that is invoked when a navigation error occurs.\r\n *\r\n * If the handler returns a value, the navigation Promise is resolved with this value.\r\n * If the handler throws an exception, the navigation Promise is rejected with\r\n * the exception.\r\n *\r\n * @publicApi\r\n */\r\ndeclare type ErrorHandler = (error: any) => any;\r\n\r\n/**\r\n * Router events that allow you to track the lifecycle of the router.\r\n *\r\n * The events occur in the following sequence:\r\n *\r\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\r\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\r\n * the router [lazy loads](/guide/router#lazy-loading) a route configuration.\r\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\r\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\r\n * and the routes are recognized.\r\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\r\n * phase of routing.\r\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\r\n * begins activating a route's children.\r\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\r\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\r\n * phase of routing successfully.\r\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\r\n * phase of routing.\r\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\r\n * phase of routing successfully.\r\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\r\n * activating a route's children.\r\n * * [ActivationEnd](api/router/ActivationEnd): When the router finishes activating a route.\r\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\r\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\r\n * * [NavigationError](api/router/NavigationError): When navigation fails\r\n * due to an unexpected error.\r\n * * [Scroll](api/router/Scroll): When the user scrolls.\r\n *\r\n * @publicApi\r\n */\r\ndeclare type Event_2 = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;\r\nexport { Event_2 as Event }\r\n\r\n/**\r\n * A set of configuration options for a router module, provided in the\r\n * `forRoot()` method.\r\n *\r\n * @see `forRoot()`\r\n *\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface ExtraOptions {\r\n    /**\r\n     * When true, log all internal navigation events to the console.\r\n     * Use for debugging.\r\n     */\r\n    enableTracing?: boolean;\r\n    /**\r\n     * When true, enable the location strategy that uses the URL fragment\r\n     * instead of the history API.\r\n     */\r\n    useHash?: boolean;\r\n    /**\r\n     * One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.\r\n     * When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root\r\n     * component is created. The bootstrap is blocked until the initial navigation is complete. This\r\n     * value is required for [server-side rendering](guide/universal) to work. When set to\r\n     * `enabledNonBlocking`, the initial navigation starts after the root component has been created.\r\n     * The bootstrap is not blocked on the completion of the initial navigation. When set to\r\n     * `disabled`, the initial navigation is not performed. The location listener is set up before the\r\n     * root component gets created. Use if there is a reason to have more control over when the router\r\n     * starts its initial navigation due to some complex initialization logic.\r\n     */\r\n    initialNavigation?: InitialNavigation;\r\n    /**\r\n     * A custom error handler for failed navigations.\r\n     * If the handler returns a value, the navigation Promise is resolved with this value.\r\n     * If the handler throws an exception, the navigation Promise is rejected with the exception.\r\n     *\r\n     */\r\n    errorHandler?: ErrorHandler;\r\n    /**\r\n     * Configures a preloading strategy.\r\n     * One of `PreloadAllModules` or `NoPreloading` (the default).\r\n     */\r\n    preloadingStrategy?: any;\r\n    /**\r\n     * Define what the router should do if it receives a navigation request to the current URL.\r\n     * Default is `ignore`, which causes the router ignores the navigation.\r\n     * This can disable features such as a \"refresh\" button.\r\n     * Use this option to configure the behavior when navigating to the\r\n     * current URL. Default is 'ignore'.\r\n     */\r\n    onSameUrlNavigation?: 'reload' | 'ignore';\r\n    /**\r\n     * Configures if the scroll position needs to be restored when navigating back.\r\n     *\r\n     * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\r\n     * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\r\n     * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\r\n     * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\r\n     * navigation). This option will be the default in the future.\r\n     *\r\n     * You can implement custom scroll restoration behavior by adapting the enabled behavior as\r\n     * in the following example.\r\n     *\r\n     * ```typescript\r\n     * class AppModule {\r\n     *   constructor(router: Router, viewportScroller: ViewportScroller) {\r\n     *     router.events.pipe(\r\n     *       filter((e: Event): e is Scroll => e instanceof Scroll)\r\n     *     ).subscribe(e => {\r\n     *       if (e.position) {\r\n     *         // backward navigation\r\n     *         viewportScroller.scrollToPosition(e.position);\r\n     *       } else if (e.anchor) {\r\n     *         // anchor navigation\r\n     *         viewportScroller.scrollToAnchor(e.anchor);\r\n     *       } else {\r\n     *         // forward navigation\r\n     *         viewportScroller.scrollToPosition([0, 0]);\r\n     *       }\r\n     *     });\r\n     *   }\r\n     * }\r\n     * ```\r\n     */\r\n    scrollPositionRestoration?: 'disabled' | 'enabled' | 'top';\r\n    /**\r\n     * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\r\n     * Anchor scrolling is disabled by default.\r\n     *\r\n     * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\r\n     * that we stored or scroll to the top.\r\n     */\r\n    anchorScrolling?: 'disabled' | 'enabled';\r\n    /**\r\n     * Configures the scroll offset the router will use when scrolling to an element.\r\n     *\r\n     * When given a tuple with x and y position value,\r\n     * the router uses that offset each time it scrolls.\r\n     * When given a function, the router invokes the function every time\r\n     * it restores scroll position.\r\n     */\r\n    scrollOffset?: [number, number] | (() => [number, number]);\r\n    /**\r\n     * Defines how the router merges parameters, data, and resolved data from parent to child\r\n     * routes. By default ('emptyOnly'), inherits parent parameters only for\r\n     * path-less or component-less routes.\r\n     *\r\n     * Set to 'always' to enable unconditional inheritance of parent parameters.\r\n     *\r\n     * Note that when dealing with matrix parameters, \"parent\" refers to the parent `Route`\r\n     * config which does not necessarily mean the \"URL segment to the left\". When the `Route` `path`\r\n     * contains multiple segments, the matrix parameters must appear on the last segment. For example,\r\n     * matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not\r\n     * `a;foo=bar/b`.\r\n     *\r\n     */\r\n    paramsInheritanceStrategy?: 'emptyOnly' | 'always';\r\n    /**\r\n     * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\r\n     * invalid character sequences.\r\n     * The default implementation is to redirect to the root URL, dropping\r\n     * any path or parameter information. The function takes three parameters:\r\n     *\r\n     * - `'URIError'` - Error thrown when parsing a bad URL.\r\n     * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\r\n     * - `'url'` -  The malformed URL that caused the URIError\r\n     * */\r\n    malformedUriErrorHandler?: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\r\n    /**\r\n     * Defines when the router updates the browser URL. By default ('deferred'),\r\n     * update after successful navigation.\r\n     * Set to 'eager' if prefer to update the URL at the beginning of navigation.\r\n     * Updating the URL early allows you to handle a failure of navigation by\r\n     * showing an error message with the URL that failed.\r\n     */\r\n    urlUpdateStrategy?: 'deferred' | 'eager';\r\n    /**\r\n     * Enables a bug fix that corrects relative link resolution in components with empty paths.\r\n     * Example:\r\n     *\r\n     * ```\r\n     * const routes = [\r\n     *   {\r\n     *     path: '',\r\n     *     component: ContainerComponent,\r\n     *     children: [\r\n     *       { path: 'a', component: AComponent },\r\n     *       { path: 'b', component: BComponent },\r\n     *     ]\r\n     *   }\r\n     * ];\r\n     * ```\r\n     *\r\n     * From the `ContainerComponent`, you should be able to navigate to `AComponent` using\r\n     * the following `routerLink`, but it will not work if `relativeLinkResolution` is set\r\n     * to `'legacy'`:\r\n     *\r\n     * `<a [routerLink]=\"['./a']\">Link to A</a>`\r\n     *\r\n     * However, this will work:\r\n     *\r\n     * `<a [routerLink]=\"['../a']\">Link to A</a>`\r\n     *\r\n     * In other words, you're required to use `../` rather than `./` when the relative link\r\n     * resolution is set to `'legacy'`.\r\n     *\r\n     * The default in v11 is `corrected`.\r\n     */\r\n    relativeLinkResolution?: 'legacy' | 'corrected';\r\n}\r\n\r\n/**\r\n * An event triggered at the end of the Guard phase of routing.\r\n *\r\n * @see `GuardsCheckStart`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class GuardsCheckEnd extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot;\r\n    /** @docsNotRequired */\r\n    shouldActivate: boolean;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string, \r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot, \r\n    /** @docsNotRequired */\r\n    shouldActivate: boolean);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered at the start of the Guard phase of routing.\r\n *\r\n * @see `GuardsCheckEnd`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class GuardsCheckStart extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string, \r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * Allowed values in an `ExtraOptions` object that configure\r\n * when the router performs the initial navigation operation.\r\n *\r\n * * 'enabledNonBlocking' - (default) The initial navigation starts after the\r\n * root component has been created. The bootstrap is not blocked on the completion of the initial\r\n * navigation.\r\n * * 'enabledBlocking' - The initial navigation starts before the root component is created.\r\n * The bootstrap is blocked until the initial navigation is complete. This value is required\r\n * for [server-side rendering](guide/universal) to work.\r\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\r\n * the root component gets created. Use if there is a reason to have\r\n * more control over when the router starts its initial navigation due to some complex\r\n * initialization logic.\r\n *\r\n * The following values have been [deprecated](guide/releases#deprecation-practices) since v11,\r\n * and should not be used for new applications.\r\n *\r\n * * 'enabled' - This option is 1:1 replaceable with `enabledBlocking`.\r\n *\r\n * @see `forRoot()`\r\n *\r\n * @publicApi\r\n */\r\nexport declare type InitialNavigation = 'disabled' | 'enabled' | 'enabledBlocking' | 'enabledNonBlocking';\r\n\r\n/**\r\n * A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`\r\n * for the current router state.\r\n *\r\n * @publicApi\r\n * @see Router.isActive\r\n */\r\nexport declare interface IsActiveMatchOptions {\r\n    /**\r\n     * Defines the strategy for comparing the matrix parameters of two `UrlTree`s.\r\n     *\r\n     * The matrix parameter matching is dependent on the strategy for matching the\r\n     * segments. That is, if the `paths` option is set to `'subset'`, only\r\n     * the matrix parameters of the matching segments will be compared.\r\n     *\r\n     * - `'exact'`: Requires that matching segments also have exact matrix parameter\r\n     * matches.\r\n     * - `'subset'`: The matching segments in the router's active `UrlTree` may contain\r\n     * extra matrix parameters, but those that exist in the `UrlTree` in question must match.\r\n     * - `'ignored'`: When comparing `UrlTree`s, matrix params will be ignored.\r\n     */\r\n    matrixParams: 'exact' | 'subset' | 'ignored';\r\n    /**\r\n     * Defines the strategy for comparing the query parameters of two `UrlTree`s.\r\n     *\r\n     * - `'exact'`: the query parameters must match exactly.\r\n     * - `'subset'`: the active `UrlTree` may contain extra parameters,\r\n     * but must match the key and value of any that exist in the `UrlTree` in question.\r\n     * - `'ignored'`: When comparing `UrlTree`s, query params will be ignored.\r\n     */\r\n    queryParams: 'exact' | 'subset' | 'ignored';\r\n    /**\r\n     * Defines the strategy for comparing the `UrlSegment`s of the `UrlTree`s.\r\n     *\r\n     * - `'exact'`: all segments in each `UrlTree` must match.\r\n     * - `'subset'`: a `UrlTree` will be determined to be active if it\r\n     * is a subtree of the active route. That is, the active route may contain extra\r\n     * segments, but must at least have all the segements of the `UrlTree` in question.\r\n     */\r\n    paths: 'exact' | 'subset';\r\n    /**\r\n     * - 'exact'`: indicates that the `UrlTree` fragments must be equal.\r\n     * - `'ignored'`: the fragments will not be compared when determining if a\r\n     * `UrlTree` is active.\r\n     */\r\n    fragment: 'exact' | 'ignored';\r\n}\r\n\r\n/**\r\n *\r\n * A function that returns a set of routes to load.\r\n *\r\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\r\n * form (`LoadChildrenCallback`) should be used instead.\r\n *\r\n * @see `loadChildrenCallback`\r\n * @publicApi\r\n */\r\nexport declare type LoadChildren = LoadChildrenCallback | DeprecatedLoadChildren;\r\n\r\n/**\r\n *\r\n * A function that is called to resolve a collection of lazy-loaded routes.\r\n * Must be an arrow function of the following form:\r\n * `() => import('...').then(mod => mod.MODULE)`\r\n *\r\n * For example:\r\n *\r\n * ```\r\n * [{\r\n *   path: 'lazy',\r\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\r\n * }];\r\n * ```\r\n *\r\n * @see [Route.loadChildren](api/router/Route#loadChildren)\r\n * @publicApi\r\n */\r\nexport declare type LoadChildrenCallback = () => Type<any> | NgModuleFactory<any> | Observable<Type<any>> | Promise<NgModuleFactory<any> | Type<any> | any>;\r\n\r\n/**\r\n * Information about a navigation operation.\r\n * Retrieve the most recent navigation object with the\r\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\r\n *\r\n * * *id* : The unique identifier of the current navigation.\r\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\r\n * This is the value before the router has parsed or applied redirects to it.\r\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\r\n * * *finalUrl* : The extracted URL after redirects have been applied.\r\n * This URL may not be available immediately, therefore this property can be `undefined`.\r\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\r\n * * *trigger* : Identifies how this navigation was triggered.\r\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\r\n * -- 'popstate'--Triggered by a popstate event.\r\n * -- 'hashchange'--Triggered by a hashchange event.\r\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\r\n * navigation.\r\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\r\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\r\n * own `previousNavigation`.\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface Navigation {\r\n    /**\r\n     * The unique identifier of the current navigation.\r\n     */\r\n    id: number;\r\n    /**\r\n     * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\r\n     * the value before the router has parsed or applied redirects to it.\r\n     */\r\n    initialUrl: string | UrlTree;\r\n    /**\r\n     * The initial target URL after being parsed with `UrlSerializer.extract()`.\r\n     */\r\n    extractedUrl: UrlTree;\r\n    /**\r\n     * The extracted URL after redirects have been applied.\r\n     * This URL may not be available immediately, therefore this property can be `undefined`.\r\n     * It is guaranteed to be set after the `RoutesRecognized` event fires.\r\n     */\r\n    finalUrl?: UrlTree;\r\n    /**\r\n     * Identifies how this navigation was triggered.\r\n     *\r\n     * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\r\n     * * 'popstate'--Triggered by a popstate event.\r\n     * * 'hashchange'--Triggered by a hashchange event.\r\n     */\r\n    trigger: 'imperative' | 'popstate' | 'hashchange';\r\n    /**\r\n     * Options that controlled the strategy used for this navigation.\r\n     * See `NavigationExtras`.\r\n     */\r\n    extras: NavigationExtras;\r\n    /**\r\n     * The previously successful `Navigation` object. Only one previous navigation\r\n     * is available, therefore this previous `Navigation` object has a `null` value\r\n     * for its own `previousNavigation`.\r\n     */\r\n    previousNavigation: Navigation | null;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Options that modify the `Router` navigation strategy.\r\n * Supply an object containing any of these properties to a `Router` navigation function to\r\n * control how the navigation should be handled.\r\n *\r\n * @see [Router.navigate() method](api/router/Router#navigate)\r\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\r\n * @see [Routing and Navigation guide](guide/router)\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface NavigationBehaviorOptions {\r\n    /**\r\n     * When true, navigates without pushing a new state into history.\r\n     *\r\n     * ```\r\n     * // Navigate silently to /view\r\n     * this.router.navigate(['/view'], { skipLocationChange: true });\r\n     * ```\r\n     */\r\n    skipLocationChange?: boolean;\r\n    /**\r\n     * When true, navigates while replacing the current state in history.\r\n     *\r\n     * ```\r\n     * // Navigate to /view\r\n     * this.router.navigate(['/view'], { replaceUrl: true });\r\n     * ```\r\n     */\r\n    replaceUrl?: boolean;\r\n    /**\r\n     * Developer-defined state that can be passed to any navigation.\r\n     * Access this value through the `Navigation.extras` object\r\n     * returned from the [Router.getCurrentNavigation()\r\n     * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\r\n     *\r\n     * After a navigation completes, the router writes an object containing this\r\n     * value together with a `navigationId` to `history.state`.\r\n     * The value is written when `location.go()` or `location.replaceState()`\r\n     * is called before activating this route.\r\n     *\r\n     * Note that `history.state` does not pass an object equality test because\r\n     * the router adds the `navigationId` on each navigation.\r\n     *\r\n     */\r\n    state?: {\r\n        [k: string]: any;\r\n    };\r\n}\r\n\r\n/**\r\n * An event triggered when a navigation is canceled, directly or indirectly.\r\n * This can happen for several reasons including when a route guard\r\n * returns `false` or initiates a redirect by returning a `UrlTree`.\r\n *\r\n * @see `NavigationStart`\r\n * @see `NavigationEnd`\r\n * @see `NavigationError`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class NavigationCancel extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    reason: string;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    reason: string);\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered when a navigation ends successfully.\r\n *\r\n * @see `NavigationStart`\r\n * @see `NavigationCancel`\r\n * @see `NavigationError`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class NavigationEnd extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string);\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered when a navigation fails due to an unexpected error.\r\n *\r\n * @see `NavigationStart`\r\n * @see `NavigationEnd`\r\n * @see `NavigationCancel`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class NavigationError extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    error: any;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    error: any);\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Options that modify the `Router` navigation strategy.\r\n * Supply an object containing any of these properties to a `Router` navigation function to\r\n * control how the target URL should be constructed or interpreted.\r\n *\r\n * @see [Router.navigate() method](api/router/Router#navigate)\r\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\r\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\r\n * @see [Routing and Navigation guide](guide/router)\r\n * @see UrlCreationOptions\r\n * @see NavigationBehaviorOptions\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {\r\n}\r\n\r\n/**\r\n * An event triggered when a navigation starts.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class NavigationStart extends RouterEvent {\r\n    /**\r\n     * Identifies the call or event that triggered the navigation.\r\n     * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\r\n     *\r\n     * @see `NavigationEnd`\r\n     * @see `NavigationCancel`\r\n     * @see `NavigationError`\r\n     */\r\n    navigationTrigger?: 'imperative' | 'popstate' | 'hashchange';\r\n    /**\r\n     * The navigation state that was previously supplied to the `pushState` call,\r\n     * when the navigation is triggered by a `popstate` event. Otherwise null.\r\n     *\r\n     * The state object is defined by `NavigationExtras`, and contains any\r\n     * developer-defined state value, as well as a unique ID that\r\n     * the router assigns to every router transition/navigation.\r\n     *\r\n     * From the perspective of the router, the router never \"goes back\".\r\n     * When the user clicks on the back button in the browser,\r\n     * a new navigation ID is created.\r\n     *\r\n     * Use the ID in this previous-state object to differentiate between a newly created\r\n     * state and one returned to by a `popstate` event, so that you can restore some\r\n     * remembered state, such as scroll position.\r\n     *\r\n     */\r\n    restoredState?: {\r\n        [k: string]: any;\r\n        navigationId: number;\r\n    } | null;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    navigationTrigger?: 'imperative' | 'popstate' | 'hashchange', \r\n    /** @docsNotRequired */\r\n    restoredState?: {\r\n        [k: string]: any;\r\n        navigationId: number;\r\n    } | null);\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Provides a preloading strategy that does not preload any modules.\r\n *\r\n * This strategy is enabled by default.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class NoPreloading implements PreloadingStrategy {\r\n    preload(route: Route, fn: () => Observable<any>): Observable<any>;\r\n}\r\n\r\n/**\r\n * Store contextual information about a `RouterOutlet`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class OutletContext {\r\n    outlet: RouterOutletContract | null;\r\n    route: ActivatedRoute | null;\r\n    resolver: ComponentFactoryResolver | null;\r\n    children: ChildrenOutletContexts;\r\n    attachRef: ComponentRef<any> | null;\r\n}\r\n\r\n/**\r\n * A map that provides access to the required and optional parameters\r\n * specific to a route.\r\n * The map supports retrieving a single value with `get()`\r\n * or multiple values with `getAll()`.\r\n *\r\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface ParamMap {\r\n    /**\r\n     * Reports whether the map contains a given parameter.\r\n     * @param name The parameter name.\r\n     * @returns True if the map contains the given parameter, false otherwise.\r\n     */\r\n    has(name: string): boolean;\r\n    /**\r\n     * Retrieves a single value for a parameter.\r\n     * @param name The parameter name.\r\n     * @return The parameter's single value,\r\n     * or the first value if the parameter has multiple values,\r\n     * or `null` when there is no such parameter.\r\n     */\r\n    get(name: string): string | null;\r\n    /**\r\n     * Retrieves multiple values for a parameter.\r\n     * @param name The parameter name.\r\n     * @return An array containing one or more values,\r\n     * or an empty array if there is no such parameter.\r\n     *\r\n     */\r\n    getAll(name: string): string[];\r\n    /** Names of the parameters in the map. */\r\n    readonly keys: string[];\r\n}\r\n\r\n/**\r\n * A collection of matrix and query URL parameters.\r\n * @see `convertToParamMap()`\r\n * @see `ParamMap`\r\n *\r\n * @publicApi\r\n */\r\nexport declare type Params = {\r\n    [key: string]: any;\r\n};\r\n\r\n/**\r\n * @description\r\n *\r\n * Provides a preloading strategy that preloads all modules as quickly as possible.\r\n *\r\n * ```\r\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class PreloadAllModules implements PreloadingStrategy {\r\n    preload(route: Route, fn: () => Observable<any>): Observable<any>;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Provides a preloading strategy.\r\n *\r\n * @publicApi\r\n */\r\nexport declare abstract class PreloadingStrategy {\r\n    abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\r\n}\r\n\r\n/**\r\n * The primary routing outlet.\r\n *\r\n * @publicApi\r\n */\r\nexport declare const PRIMARY_OUTLET = \"primary\";\r\n\r\n/**\r\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\r\n * @param routes The route configuration to provide.\r\n *\r\n * @usageNotes\r\n *\r\n * ```\r\n * @NgModule({\r\n *   imports: [RouterModule.forChild(ROUTES)],\r\n *   providers: [provideRoutes(EXTRA_ROUTES)]\r\n * })\r\n * class MyNgModule {}\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare function provideRoutes(routes: Routes): any;\r\n\r\n/**\r\n *\r\n * How to handle query parameters in a router link.\r\n * One of:\r\n * - `merge` : Merge new with current parameters.\r\n * - `preserve` : Preserve current parameters.\r\n *\r\n * @see `UrlCreationOptions#queryParamsHandling`\r\n * @see `RouterLink`\r\n * @publicApi\r\n */\r\nexport declare type QueryParamsHandling = 'merge' | 'preserve' | '';\r\n\r\n/**\r\n * @description\r\n *\r\n * Interface that classes can implement to be a data provider.\r\n * A data provider class can be used with the router to resolve data during navigation.\r\n * The interface defines a `resolve()` method that is invoked when the navigation starts.\r\n * The router waits for the data to be resolved before the route is finally activated.\r\n *\r\n * The following example implements a `resolve()` method that retrieves the data\r\n * needed to activate the requested route.\r\n *\r\n * ```\r\n * @Injectable({ providedIn: 'root' })\r\n * export class HeroResolver implements Resolve<Hero> {\r\n *   constructor(private service: HeroService) {}\r\n *\r\n *   resolve(\r\n *     route: ActivatedRouteSnapshot,\r\n *     state: RouterStateSnapshot\r\n *   ): Observable<any>|Promise<any>|any {\r\n *     return this.service.getHero(route.paramMap.get('id'));\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * Here, the defined `resolve()` function is provided as part of the `Route` object\r\n * in the router configuration:\r\n *\r\n * ```\r\n\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'detail/:id',\r\n *         component: HeroDetailComponent,\r\n *         resolve: {\r\n *           hero: HeroResolver\r\n *         }\r\n *       }\r\n *     ])\r\n *   ],\r\n *   exports: [RouterModule]\r\n * })\r\n * export class AppRoutingModule {}\r\n * ```\r\n *\r\n * You can alternatively provide an in-line function with the `resolve()` signature:\r\n *\r\n * ```\r\n * export const myHero: Hero = {\r\n *   // ...\r\n * }\r\n *\r\n * @NgModule({\r\n *   imports: [\r\n *     RouterModule.forRoot([\r\n *       {\r\n *         path: 'detail/:id',\r\n *         component: HeroComponent,\r\n *         resolve: {\r\n *           hero: 'heroResolver'\r\n *         }\r\n *       }\r\n *     ])\r\n *   ],\r\n *   providers: [\r\n *     {\r\n *       provide: 'heroResolver',\r\n *       useValue: (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => myHero\r\n *     }\r\n *   ]\r\n * })\r\n * export class AppModule {}\r\n * ```\r\n *\r\n * @usageNotes\r\n *\r\n * When both guard and resolvers are specified, the resolvers are not executed until\r\n * all guards have run and succeeded.\r\n * For example, consider the following route configuration:\r\n *\r\n * ```\r\n * {\r\n *  path: 'base'\r\n *  canActivate: [BaseGuard],\r\n *  resolve: {data: BaseDataResolver}\r\n *  children: [\r\n *   {\r\n *     path: 'child',\r\n *     guards: [ChildGuard],\r\n *     component: ChildComponent,\r\n *     resolve: {childData: ChildDataResolver}\r\n *    }\r\n *  ]\r\n * }\r\n * ```\r\n * The order of execution is: BaseGuard, ChildGuard, BaseDataResolver, ChildDataResolver.\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface Resolve<T> {\r\n    resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<T> | Promise<T> | T;\r\n}\r\n\r\n/**\r\n *\r\n * Represents the resolved data associated with a particular route.\r\n *\r\n * @see `Route#resolve`.\r\n *\r\n * @publicApi\r\n */\r\nexport declare type ResolveData = {\r\n    [name: string]: any;\r\n};\r\n\r\n/**\r\n * An event triggered at the end of the Resolve phase of routing.\r\n * @see `ResolveStart`.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ResolveEnd extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string, \r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered at the start of the Resolve phase of routing.\r\n *\r\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\r\n * In future, may change to only run when there are things to be resolved.\r\n *\r\n * @see `ResolveEnd`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class ResolveStart extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string, \r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * A configuration object that defines a single route.\r\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\r\n * The router attempts to match segments of a given URL against each route,\r\n * using the configuration options defined in this object.\r\n *\r\n * Supports static, parameterized, redirect, and wildcard routes, as well as\r\n * custom route data and resolve methods.\r\n *\r\n * For detailed usage information, see the [Routing Guide](guide/router).\r\n *\r\n * @usageNotes\r\n *\r\n * ### Simple Configuration\r\n *\r\n * The following route specifies that when navigating to, for example,\r\n * `/team/11/user/bob`, the router creates the 'Team' component\r\n * with the 'User' child component in it.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'team/:id',\r\n *  component: Team,\r\n *   children: [{\r\n *     path: 'user/:name',\r\n *     component: User\r\n *   }]\r\n * }]\r\n * ```\r\n *\r\n * ### Multiple Outlets\r\n *\r\n * The following route creates sibling components with multiple outlets.\r\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\r\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'team/:id',\r\n *   component: Team\r\n * }, {\r\n *   path: 'chat/:user',\r\n *   component: Chat\r\n *   outlet: 'aux'\r\n * }]\r\n * ```\r\n *\r\n * ### Wild Cards\r\n *\r\n * The following route uses wild-card notation to specify a component\r\n * that is always instantiated regardless of where you navigate to.\r\n *\r\n * ```\r\n * [{\r\n *   path: '**',\r\n *   component: WildcardComponent\r\n * }]\r\n * ```\r\n *\r\n * ### Redirects\r\n *\r\n * The following route uses the `redirectTo` property to ignore a segment of\r\n * a given URL when looking for a child path.\r\n *\r\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\r\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\r\n * the Team component with the User child component in it.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'team/:id',\r\n *   component: Team,\r\n *   children: [{\r\n *     path: 'legacy/user/:name',\r\n *     redirectTo: 'user/:name'\r\n *   }, {\r\n *     path: 'user/:name',\r\n *     component: User\r\n *   }]\r\n * }]\r\n * ```\r\n *\r\n * The redirect path can be relative, as shown in this example, or absolute.\r\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\r\n * the result URL is also absolute, '/user/jim'.\r\n\r\n * ### Empty Path\r\n *\r\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\r\n * any URL segments.\r\n *\r\n * In the following configuration, when navigating to\r\n * `/team/11`, the router instantiates the 'AllUsers' component.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'team/:id',\r\n *   component: Team,\r\n *   children: [{\r\n *     path: '',\r\n *     component: AllUsers\r\n *   }, {\r\n *     path: 'user/:name',\r\n *     component: User\r\n *   }]\r\n * }]\r\n * ```\r\n *\r\n * Empty-path routes can have children. In the following example, when navigating\r\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\r\n * the user component in it.\r\n *\r\n * Note that an empty path route inherits its parent's parameters and data.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'team/:id',\r\n *   component: Team,\r\n *   children: [{\r\n *     path: '',\r\n *     component: WrapperCmp,\r\n *     children: [{\r\n *       path: 'user/:name',\r\n *       component: User\r\n *     }]\r\n *   }]\r\n * }]\r\n * ```\r\n *\r\n * ### Matching Strategy\r\n *\r\n * The default path-match strategy is 'prefix', which means that the router\r\n * checks URL elements from the left to see if the URL matches a specified path.\r\n * For example, '/team/11/user' matches 'team/:id'.\r\n *\r\n * ```\r\n * [{\r\n *   path: '',\r\n *   pathMatch: 'prefix', //default\r\n *   redirectTo: 'main'\r\n * }, {\r\n *   path: 'main',\r\n *   component: Main\r\n * }]\r\n * ```\r\n *\r\n * You can specify the path-match strategy 'full' to make sure that the path\r\n * covers the whole unconsumed URL. It is important to do this when redirecting\r\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\r\n * the router would apply the redirect even when navigating to the redirect destination,\r\n * creating an endless loop.\r\n *\r\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\r\n * that the router applies the redirect if and only if navigating to '/'.\r\n *\r\n * ```\r\n * [{\r\n *   path: '',\r\n *   pathMatch: 'full',\r\n *   redirectTo: 'main'\r\n * }, {\r\n *   path: 'main',\r\n *   component: Main\r\n * }]\r\n * ```\r\n *\r\n * ### Componentless Routes\r\n *\r\n * You can share parameters between sibling components.\r\n * For example, suppose that two sibling components should go next to each other,\r\n * and both of them require an ID parameter. You can accomplish this using a route\r\n * that does not specify a component at the top level.\r\n *\r\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\r\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\r\n * the main child and aux child components next to each other.\r\n * For this to work, the application component must have the primary and aux outlets defined.\r\n *\r\n * ```\r\n * [{\r\n *    path: 'parent/:id',\r\n *    children: [\r\n *      { path: 'a', component: MainChild },\r\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\r\n *    ]\r\n * }]\r\n * ```\r\n *\r\n * The router merges the parameters, data, and resolve of the componentless\r\n * parent into the parameters, data, and resolve of the children.\r\n *\r\n * This is especially useful when child components are defined\r\n * with an empty path string, as in the following example.\r\n * With this configuration, navigating to '/parent/10' creates\r\n * the main child and aux components.\r\n *\r\n * ```\r\n * [{\r\n *    path: 'parent/:id',\r\n *    children: [\r\n *      { path: '', component: MainChild },\r\n *      { path: '', component: AuxChild, outlet: 'aux' }\r\n *    ]\r\n * }]\r\n * ```\r\n *\r\n * ### Lazy Loading\r\n *\r\n * Lazy loading speeds up application load time by splitting the application\r\n * into multiple bundles and loading them on demand.\r\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\r\n * instead of the `children` property.\r\n *\r\n * Given the following example route, the router will lazy load\r\n * the associated module on demand using the browser native import system.\r\n *\r\n * ```\r\n * [{\r\n *   path: 'lazy',\r\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\r\n * }];\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface Route {\r\n    /**\r\n     * The path to match against. Cannot be used together with a custom `matcher` function.\r\n     * A URL string that uses router matching notation.\r\n     * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\r\n     * Default is \"/\" (the root path).\r\n     *\r\n     */\r\n    path?: string;\r\n    /**\r\n     * The path-matching strategy, one of 'prefix' or 'full'.\r\n     * Default is 'prefix'.\r\n     *\r\n     * By default, the router checks URL elements from the left to see if the URL\r\n     * matches a given path and stops when there is a config match. Importantly there must still be a\r\n     * config match for each segment of the URL. For example, '/team/11/user' matches the prefix\r\n     * 'team/:id' if one of the route's children matches the segment 'user'. That is, the URL\r\n     * '/team/11/user` matches the config\r\n     * `{path: 'team/:id', children: [{path: ':user', component: User}]}`\r\n     * but does not match when there are no children as in `{path: 'team/:id', component: Team}`.\r\n     *\r\n     * The path-match strategy 'full' matches against the entire URL.\r\n     * It is important to do this when redirecting empty-path routes.\r\n     * Otherwise, because an empty path is a prefix of any URL,\r\n     * the router would apply the redirect even when navigating\r\n     * to the redirect destination, creating an endless loop.\r\n     *\r\n     */\r\n    pathMatch?: string;\r\n    /**\r\n     * A custom URL-matching function. Cannot be used together with `path`.\r\n     */\r\n    matcher?: UrlMatcher;\r\n    /**\r\n     * The component to instantiate when the path matches.\r\n     * Can be empty if child routes specify components.\r\n     */\r\n    component?: Type<any>;\r\n    /**\r\n     * A URL to redirect to when the path matches.\r\n     *\r\n     * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\r\n     * Note that no further redirects are evaluated after an absolute redirect.\r\n     *\r\n     * When not present, router does not redirect.\r\n     */\r\n    redirectTo?: string;\r\n    /**\r\n     * Name of a `RouterOutlet` object where the component can be placed\r\n     * when the path matches.\r\n     */\r\n    outlet?: string;\r\n    /**\r\n     * An array of dependency-injection tokens used to look up `CanActivate()`\r\n     * handlers, in order to determine if the current user is allowed to\r\n     * activate the component. By default, any user can activate.\r\n     */\r\n    canActivate?: any[];\r\n    /**\r\n     * An array of DI tokens used to look up `CanActivateChild()` handlers,\r\n     * in order to determine if the current user is allowed to activate\r\n     * a child of the component. By default, any user can activate a child.\r\n     */\r\n    canActivateChild?: any[];\r\n    /**\r\n     * An array of DI tokens used to look up `CanDeactivate()`\r\n     * handlers, in order to determine if the current user is allowed to\r\n     * deactivate the component. By default, any user can deactivate.\r\n     *\r\n     */\r\n    canDeactivate?: any[];\r\n    /**\r\n     * An array of DI tokens used to look up `CanLoad()`\r\n     * handlers, in order to determine if the current user is allowed to\r\n     * load the component. By default, any user can load.\r\n     */\r\n    canLoad?: any[];\r\n    /**\r\n     * Additional developer-defined data provided to the component via\r\n     * `ActivatedRoute`. By default, no additional data is passed.\r\n     */\r\n    data?: Data;\r\n    /**\r\n     * A map of DI tokens used to look up data resolvers. See `Resolve`.\r\n     */\r\n    resolve?: ResolveData;\r\n    /**\r\n     * An array of child `Route` objects that specifies a nested route\r\n     * configuration.\r\n     */\r\n    children?: Routes;\r\n    /**\r\n     * An object specifying lazy-loaded child routes.\r\n     */\r\n    loadChildren?: LoadChildren;\r\n    /**\r\n     * Defines when guards and resolvers will be run. One of\r\n     * - `paramsOrQueryParamsChange` : Run when query parameters change.\r\n     * - `always` : Run on every execution.\r\n     * By default, guards and resolvers run only when the matrix\r\n     * parameters of the route change.\r\n     */\r\n    runGuardsAndResolvers?: RunGuardsAndResolvers;\r\n}\r\n\r\n/**\r\n * An event triggered when a route has been lazy loaded.\r\n *\r\n * @see `RouteConfigLoadStart`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouteConfigLoadEnd {\r\n    /** @docsNotRequired */\r\n    route: Route;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    route: Route);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * An event triggered before lazy loading a route configuration.\r\n *\r\n * @see `RouteConfigLoadEnd`\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouteConfigLoadStart {\r\n    /** @docsNotRequired */\r\n    route: Route;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    route: Route);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * A service that provides navigation among views and URL manipulation capabilities.\r\n *\r\n * @see `Route`.\r\n * @see [Routing and Navigation Guide](guide/router).\r\n *\r\n * @ngModule RouterModule\r\n *\r\n * @publicApi\r\n */\r\nexport declare class Router {\r\n    private rootComponentType;\r\n    private urlSerializer;\r\n    private rootContexts;\r\n    private location;\r\n    config: Routes;\r\n    /**\r\n     * Represents the activated `UrlTree` that the `Router` is configured to handle (through\r\n     * `UrlHandlingStrategy`). That is, after we find the route config tree that we're going to\r\n     * activate, run guards, and are just about to activate the route, we set the currentUrlTree.\r\n     *\r\n     * This should match the `browserUrlTree` when a navigation succeeds. If the\r\n     * `UrlHandlingStrategy.shouldProcessUrl` is `false`, only the `browserUrlTree` is updated.\r\n     */\r\n    private currentUrlTree;\r\n    /**\r\n     * Meant to represent the entire browser url after a successful navigation. In the life of a\r\n     * navigation transition:\r\n     * 1. The rawUrl represents the full URL that's being navigated to\r\n     * 2. We apply redirects, which might only apply to _part_ of the URL (due to\r\n     * `UrlHandlingStrategy`).\r\n     * 3. Right before activation (because we assume activation will succeed), we update the\r\n     * rawUrlTree to be a combination of the urlAfterRedirects (again, this might only apply to part\r\n     * of the initial url) and the rawUrl of the transition (which was the original navigation url in\r\n     * its full form).\r\n     */\r\n    private rawUrlTree;\r\n    /**\r\n     * Meant to represent the part of the browser url that the `Router` is set up to handle (via the\r\n     * `UrlHandlingStrategy`). This value is updated immediately after the browser url is updated (or\r\n     * the browser url update is skipped via `skipLocationChange`). With that, note that\r\n     * `browserUrlTree` _may not_ reflect the actual browser URL for two reasons:\r\n     *\r\n     * 1. `UrlHandlingStrategy` only handles part of the URL\r\n     * 2. `skipLocationChange` does not update the browser url.\r\n     *\r\n     * So to reiterate, `browserUrlTree` only represents the Router's internal understanding of the\r\n     * current route, either before guards with `urlUpdateStrategy === 'eager'` or right before\r\n     * activation with `'deferred'`.\r\n     *\r\n     * This should match the `currentUrlTree` when the navigation succeeds.\r\n     */\r\n    private browserUrlTree;\r\n    private readonly transitions;\r\n    private navigations;\r\n    private lastSuccessfulNavigation;\r\n    private currentNavigation;\r\n    private disposed;\r\n    private locationSubscription?;\r\n    /**\r\n     * Tracks the previously seen location change from the location subscription so we can compare\r\n     * the two latest to see if they are duplicates. See setUpLocationChangeListener.\r\n     */\r\n    private lastLocationChangeInfo;\r\n    private navigationId;\r\n    /**\r\n     * The id of the currently active page in the router.\r\n     * Updated to the transition's target id on a successful navigation.\r\n     *\r\n     * This is used to track what page the router last activated. When an attempted navigation fails,\r\n     * the router can then use this to compute how to restore the state back to the previously active\r\n     * page.\r\n     */\r\n    private currentPageId;\r\n    /**\r\n     * The ɵrouterPageId of whatever page is currently active in the browser history. This is\r\n     * important for computing the target page id for new navigations because we need to ensure each\r\n     * page id in the browser history is 1 more than the previous entry.\r\n     */\r\n    private get browserPageId();\r\n    private configLoader;\r\n    private ngModule;\r\n    private console;\r\n    private isNgZoneEnabled;\r\n    /**\r\n     * An event stream for routing events in this NgModule.\r\n     */\r\n    readonly events: Observable<Event_2>;\r\n    /**\r\n     * The current state of routing in this NgModule.\r\n     */\r\n    readonly routerState: RouterState;\r\n    /**\r\n     * A handler for navigation errors in this NgModule.\r\n     */\r\n    errorHandler: ErrorHandler;\r\n    /**\r\n     * A handler for errors thrown by `Router.parseUrl(url)`\r\n     * when `url` contains an invalid character.\r\n     * The most common case is a `%` sign\r\n     * that's not encoded and is not part of a percent encoded sequence.\r\n     */\r\n    malformedUriErrorHandler: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\r\n    /**\r\n     * True if at least one navigation event has occurred,\r\n     * false otherwise.\r\n     */\r\n    navigated: boolean;\r\n    private lastSuccessfulId;\r\n    /**\r\n     * A strategy for extracting and merging URLs.\r\n     * Used for AngularJS to Angular migrations.\r\n     */\r\n    urlHandlingStrategy: UrlHandlingStrategy;\r\n    /**\r\n     * A strategy for re-using routes.\r\n     */\r\n    routeReuseStrategy: RouteReuseStrategy;\r\n    /**\r\n     * How to handle a navigation request to the current URL. One of:\r\n     *\r\n     * - `'ignore'` :  The router ignores the request.\r\n     * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\r\n     *\r\n     * Note that this only configures whether the Route reprocesses the URL and triggers related\r\n     * action and events like redirects, guards, and resolvers. By default, the router re-uses a\r\n     * component instance when it re-navigates to the same component type without visiting a different\r\n     * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload\r\n     * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`\r\n     * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.\r\n     */\r\n    onSameUrlNavigation: 'reload' | 'ignore';\r\n    /**\r\n     * How to merge parameters, data, and resolved data from parent to child\r\n     * routes. One of:\r\n     *\r\n     * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\r\n     * for path-less or component-less routes.\r\n     * - `'always'` : Inherit parent parameters, data, and resolved data\r\n     * for all child routes.\r\n     */\r\n    paramsInheritanceStrategy: 'emptyOnly' | 'always';\r\n    /**\r\n     * Determines when the router updates the browser URL.\r\n     * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\r\n     * Set to `'eager'` to update the browser URL at the beginning of navigation.\r\n     * You can choose to update early so that, if navigation fails,\r\n     * you can show an error message with the URL that failed.\r\n     */\r\n    urlUpdateStrategy: 'deferred' | 'eager';\r\n    /**\r\n     * Enables a bug fix that corrects relative link resolution in components with empty paths.\r\n     * @see `RouterModule`\r\n     */\r\n    relativeLinkResolution: 'legacy' | 'corrected';\r\n    /**\r\n     * Creates the router service.\r\n     */\r\n    constructor(rootComponentType: Type<any> | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location_2, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes);\r\n    private setupNavigations;\r\n    private getTransition;\r\n    private setTransition;\r\n    /**\r\n     * Sets up the location change listener and performs the initial navigation.\r\n     */\r\n    initialNavigation(): void;\r\n    /**\r\n     * Sets up the location change listener. This listener detects navigations triggered from outside\r\n     * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\r\n     * navigation so that the correct events, guards, etc. are triggered.\r\n     */\r\n    setUpLocationChangeListener(): void;\r\n    /** Extracts router-related information from a `PopStateEvent`. */\r\n    private extractLocationChangeInfoFromEvent;\r\n    /**\r\n     * Determines whether two events triggered by the Location subscription are due to the same\r\n     * navigation. The location subscription can fire two events (popstate and hashchange) for a\r\n     * single navigation. The second one should be ignored, that is, we should not schedule another\r\n     * navigation in the Router.\r\n     */\r\n    private shouldScheduleNavigation;\r\n    /** The current URL. */\r\n    get url(): string;\r\n    /**\r\n     * Returns the current `Navigation` object when the router is navigating,\r\n     * and `null` when idle.\r\n     */\r\n    getCurrentNavigation(): Navigation | null;\r\n    /**\r\n     * Resets the route configuration used for navigation and generating links.\r\n     *\r\n     * @param config The route array for the new configuration.\r\n     *\r\n     * @usageNotes\r\n     *\r\n     * ```\r\n     * router.resetConfig([\r\n     *  { path: 'team/:id', component: TeamCmp, children: [\r\n     *    { path: 'simple', component: SimpleCmp },\r\n     *    { path: 'user/:name', component: UserCmp }\r\n     *  ]}\r\n     * ]);\r\n     * ```\r\n     */\r\n    resetConfig(config: Routes): void;\r\n    /** @nodoc */\r\n    ngOnDestroy(): void;\r\n    /** Disposes of the router. */\r\n    dispose(): void;\r\n    /**\r\n     * Appends URL segments to the current URL tree to create a new URL tree.\r\n     *\r\n     * @param commands An array of URL fragments with which to construct the new URL tree.\r\n     * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\r\n     * segments, followed by the parameters for each segment.\r\n     * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\r\n     * property of the options object, if supplied.\r\n     * @param navigationExtras Options that control the navigation strategy.\r\n     * @returns The new URL tree.\r\n     *\r\n     * @usageNotes\r\n     *\r\n     * ```\r\n     * // create /team/33/user/11\r\n     * router.createUrlTree(['/team', 33, 'user', 11]);\r\n     *\r\n     * // create /team/33;expand=true/user/11\r\n     * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\r\n     *\r\n     * // you can collapse static segments like this (this works only with the first passed-in value):\r\n     * router.createUrlTree(['/team/33/user', userId]);\r\n     *\r\n     * // If the first segment can contain slashes, and you do not want the router to split it,\r\n     * // you can do the following:\r\n     * router.createUrlTree([{segmentPath: '/one/two'}]);\r\n     *\r\n     * // create /team/33/(user/11//right:chat)\r\n     * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\r\n     *\r\n     * // remove the right secondary node\r\n     * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\r\n     *\r\n     * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\r\n     *\r\n     * // navigate to /team/33/user/11/details\r\n     * router.createUrlTree(['details'], {relativeTo: route});\r\n     *\r\n     * // navigate to /team/33/user/22\r\n     * router.createUrlTree(['../22'], {relativeTo: route});\r\n     *\r\n     * // navigate to /team/44/user/22\r\n     * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\r\n     *\r\n     * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\r\n     * tree should be created relative to the root.\r\n     * ```\r\n     */\r\n    createUrlTree(commands: any[], navigationExtras?: UrlCreationOptions): UrlTree;\r\n    /**\r\n     * Navigates to a view using an absolute route path.\r\n     *\r\n     * @param url An absolute path for a defined route. The function does not apply any delta to the\r\n     *     current URL.\r\n     * @param extras An object containing properties that modify the navigation strategy.\r\n     *\r\n     * @returns A Promise that resolves to 'true' when navigation succeeds,\r\n     * to 'false' when navigation fails, or is rejected on error.\r\n     *\r\n     * @usageNotes\r\n     *\r\n     * The following calls request navigation to an absolute path.\r\n     *\r\n     * ```\r\n     * router.navigateByUrl(\"/team/33/user/11\");\r\n     *\r\n     * // Navigate without updating the URL\r\n     * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\r\n     * ```\r\n     *\r\n     * @see [Routing and Navigation guide](guide/router)\r\n     *\r\n     */\r\n    navigateByUrl(url: string | UrlTree, extras?: NavigationBehaviorOptions): Promise<boolean>;\r\n    /**\r\n     * Navigate based on the provided array of commands and a starting point.\r\n     * If no starting route is provided, the navigation is absolute.\r\n     *\r\n     * @param commands An array of URL fragments with which to construct the target URL.\r\n     * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\r\n     * segments, followed by the parameters for each segment.\r\n     * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\r\n     * of the options object, if supplied.\r\n     * @param extras An options object that determines how the URL should be constructed or\r\n     *     interpreted.\r\n     *\r\n     * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\r\n     *     fails,\r\n     * or is rejected on error.\r\n     *\r\n     * @usageNotes\r\n     *\r\n     * The following calls request navigation to a dynamic route path relative to the current URL.\r\n     *\r\n     * ```\r\n     * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\r\n     *\r\n     * // Navigate without updating the URL, overriding the default behavior\r\n     * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\r\n     * ```\r\n     *\r\n     * @see [Routing and Navigation guide](guide/router)\r\n     *\r\n     */\r\n    navigate(commands: any[], extras?: NavigationExtras): Promise<boolean>;\r\n    /** Serializes a `UrlTree` into a string */\r\n    serializeUrl(url: UrlTree): string;\r\n    /** Parses a string into a `UrlTree` */\r\n    parseUrl(url: string): UrlTree;\r\n    /**\r\n     * Returns whether the url is activated.\r\n     *\r\n     * @deprecated\r\n     * Use `IsActiveMatchOptions` instead.\r\n     *\r\n     * - The equivalent `IsActiveMatchOptions` for `true` is\r\n     * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.\r\n     * - The equivalent for `false` is\r\n     * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.\r\n     */\r\n    isActive(url: string | UrlTree, exact: boolean): boolean;\r\n    /**\r\n     * Returns whether the url is activated.\r\n     */\r\n    isActive(url: string | UrlTree, matchOptions: IsActiveMatchOptions): boolean;\r\n    private removeEmptyProps;\r\n    private processNavigations;\r\n    private scheduleNavigation;\r\n    private setBrowserUrl;\r\n    /**\r\n     * Performs the necessary rollback action to restore the browser URL to the\r\n     * state before the transition.\r\n     */\r\n    private restoreHistory;\r\n    private resetState;\r\n    private resetUrlToCurrentUrlTree;\r\n    private cancelNavigationTransition;\r\n    private generateNgRouterState;\r\n}\r\n\r\n/**\r\n * A [DI token](guide/glossary/#di-token) for the router service.\r\n *\r\n * @publicApi\r\n */\r\nexport declare const ROUTER_CONFIGURATION: InjectionToken<ExtraOptions>;\r\n\r\n/**\r\n * A [DI token](guide/glossary/#di-token) for the router initializer that\r\n * is called after the app is bootstrapped.\r\n *\r\n * @publicApi\r\n */\r\nexport declare const ROUTER_INITIALIZER: InjectionToken<(compRef: ComponentRef<any>) => void>;\r\n\r\n/**\r\n * @description\r\n *\r\n * Provides a way to customize when activated routes get reused.\r\n *\r\n * @publicApi\r\n */\r\nexport declare abstract class RouteReuseStrategy {\r\n    /** Determines if this route (and its subtree) should be detached to be reused later */\r\n    abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\r\n    /**\r\n     * Stores the detached route.\r\n     *\r\n     * Storing a `null` value should erase the previously stored value.\r\n     */\r\n    abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void;\r\n    /** Determines if this route (and its subtree) should be reattached */\r\n    abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\r\n    /** Retrieves the previously stored route */\r\n    abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null;\r\n    /** Determines if a route should be reused */\r\n    abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\r\n}\r\n\r\n/**\r\n * Base for events the router goes through, as opposed to events tied to a specific\r\n * route. Fired one time for any given navigation.\r\n *\r\n * The following code shows how a class subscribes to router events.\r\n *\r\n * ```ts\r\n * import {Event, RouterEvent, Router} from '@angular/router';\r\n *\r\n * class MyService {\r\n *   constructor(public router: Router) {\r\n *     router.events.pipe(\r\n *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\r\n *     ).subscribe((e: RouterEvent) => {\r\n *       // Do something\r\n *     });\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @see `Event`\r\n * @see [Router events summary](guide/router-reference#router-events)\r\n * @publicApi\r\n */\r\nexport declare class RouterEvent {\r\n    /** A unique ID that the router assigns to every router navigation. */\r\n    id: number;\r\n    /** The URL that is the destination for this navigation. */\r\n    url: string;\r\n    constructor(\r\n    /** A unique ID that the router assigns to every router navigation. */\r\n    id: number, \r\n    /** The URL that is the destination for this navigation. */\r\n    url: string);\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * When applied to an element in a template, makes that element a link\r\n * that initiates navigation to a route. Navigation opens one or more routed components\r\n * in one or more `<router-outlet>` locations on the page.\r\n *\r\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\r\n * the following creates a static link to the route:\r\n * `<a routerLink=\"/user/bob\">link to user component</a>`\r\n *\r\n * You can use dynamic values to generate the link.\r\n * For a dynamic link, pass an array of path segments,\r\n * followed by the params for each segment.\r\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\r\n * generates a link to `/team/11/user/bob;details=true`.\r\n *\r\n * Multiple static segments can be merged into one term and combined with dynamic segements.\r\n * For example, `['/team/11/user', userName, {details: true}]`\r\n *\r\n * The input that you provide to the link is treated as a delta to the current URL.\r\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\r\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\r\n * `/user/(jim//aux:team)`.\r\n * See {@link Router#createUrlTree createUrlTree} for more information.\r\n *\r\n * @usageNotes\r\n *\r\n * You can use absolute or relative paths in a link, set query parameters,\r\n * control how parameters are handled, and keep a history of navigation states.\r\n *\r\n * ### Relative link paths\r\n *\r\n * The first segment name can be prepended with `/`, `./`, or `../`.\r\n * * If the first segment begins with `/`, the router looks up the route from the root of the\r\n *   app.\r\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\r\n *   looks in the children of the current activated route.\r\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\r\n *\r\n * ### Setting and handling query params and fragments\r\n *\r\n * The following link adds a query parameter and a fragment to the generated URL:\r\n *\r\n * ```\r\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\r\n *   link to user component\r\n * </a>\r\n * ```\r\n * By default, the directive constructs the new URL using the given query parameters.\r\n * The example generates the link: `/user/bob?debug=true#education`.\r\n *\r\n * You can instruct the directive to handle query parameters differently\r\n * by specifying the `queryParamsHandling` option in the link.\r\n * Allowed values are:\r\n *\r\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\r\n *  - `'preserve'`: Preserve the current query params.\r\n *\r\n * For example:\r\n *\r\n * ```\r\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\r\n *   link to user component\r\n * </a>\r\n * ```\r\n *\r\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\r\n *\r\n * ### Preserving navigation history\r\n *\r\n * You can provide a `state` value to be persisted to the browser's\r\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\r\n * For example:\r\n *\r\n * ```\r\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\r\n *   link to user component\r\n * </a>\r\n * ```\r\n *\r\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\r\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\r\n * event:\r\n *\r\n * ```\r\n * // Get NavigationStart events\r\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\r\n *   const navigation = router.getCurrentNavigation();\r\n *   tracingService.trace({id: navigation.extras.state.tracingId});\r\n * });\r\n * ```\r\n *\r\n * @ngModule RouterModule\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterLink implements OnChanges {\r\n    private router;\r\n    private route;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    queryParams?: Params | null;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    fragment?: string;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    queryParamsHandling?: QueryParamsHandling | null;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    preserveFragment: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    skipLocationChange: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    replaceUrl: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    state?: {\r\n        [k: string]: any;\r\n    };\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * Specify a value here when you do not want to use the default value\r\n     * for `routerLink`, which is the current activated route.\r\n     * Note that a value of `undefined` here will use the `routerLink` default.\r\n     * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    relativeTo?: ActivatedRoute | null;\r\n    private commands;\r\n    private preserve;\r\n    constructor(router: Router, route: ActivatedRoute, tabIndex: string, renderer: Renderer2, el: ElementRef);\r\n    /** @nodoc */\r\n    ngOnChanges(changes: SimpleChanges): void;\r\n    /**\r\n     * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\r\n     *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\r\n     *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\r\n     *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    set routerLink(commands: any[] | string | null | undefined);\r\n    /** @nodoc */\r\n    onClick(): boolean;\r\n    get urlTree(): UrlTree;\r\n}\r\n\r\n/**\r\n *\r\n * @description\r\n *\r\n * Tracks whether the linked route of an element is currently active, and allows you\r\n * to specify one or more CSS classes to add to the element when the linked route\r\n * is active.\r\n *\r\n * Use this directive to create a visual distinction for elements associated with an active route.\r\n * For example, the following code highlights the word \"Bob\" when the router\r\n * activates the associated route:\r\n *\r\n * ```\r\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\r\n * ```\r\n *\r\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\r\n * added to the anchor tag. If the URL changes, the class is removed.\r\n *\r\n * You can set more than one class using a space-separated string or an array.\r\n * For example:\r\n *\r\n * ```\r\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\r\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\r\n * ```\r\n *\r\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\r\n *\r\n * ```\r\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\r\n * true}\">Bob</a>\r\n * ```\r\n *\r\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\r\n * instance to a template variable.\r\n * For example, the following checks the status without assigning any CSS classes:\r\n *\r\n * ```\r\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\r\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\r\n * </a>\r\n * ```\r\n *\r\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\r\n * For example, the following sets the active-link class on the `<div>`  parent tag\r\n * when the URL is either '/user/jim' or '/user/bob'.\r\n *\r\n * ```\r\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\r\n *   <a routerLink=\"/user/jim\">Jim</a>\r\n *   <a routerLink=\"/user/bob\">Bob</a>\r\n * </div>\r\n * ```\r\n *\r\n * @ngModule RouterModule\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\r\n    private router;\r\n    private element;\r\n    private renderer;\r\n    private readonly cdr;\r\n    private link?;\r\n    private linkWithHref?;\r\n    links: QueryList<RouterLink>;\r\n    linksWithHrefs: QueryList<RouterLinkWithHref>;\r\n    private classes;\r\n    private routerEventsSubscription;\r\n    private linkInputChangesSubscription?;\r\n    readonly isActive: boolean;\r\n    /**\r\n     * Options to configure how to determine if the router link is active.\r\n     *\r\n     * These options are passed to the `Router.isActive()` function.\r\n     *\r\n     * @see Router.isActive\r\n     */\r\n    routerLinkActiveOptions: {\r\n        exact: boolean;\r\n    } | IsActiveMatchOptions;\r\n    constructor(router: Router, element: ElementRef, renderer: Renderer2, cdr: ChangeDetectorRef, link?: RouterLink | undefined, linkWithHref?: RouterLinkWithHref | undefined);\r\n    /** @nodoc */\r\n    ngAfterContentInit(): void;\r\n    private subscribeToEachLinkOnChanges;\r\n    set routerLinkActive(data: string[] | string);\r\n    /** @nodoc */\r\n    ngOnChanges(changes: SimpleChanges): void;\r\n    /** @nodoc */\r\n    ngOnDestroy(): void;\r\n    private update;\r\n    private isLinkActive;\r\n    private hasActiveLinks;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Lets you link to specific routes in your app.\r\n *\r\n * See `RouterLink` for more information.\r\n *\r\n * @ngModule RouterModule\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterLinkWithHref implements OnChanges, OnDestroy {\r\n    private router;\r\n    private route;\r\n    private locationStrategy;\r\n    target: string;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    queryParams?: Params | null;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    fragment?: string;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    queryParamsHandling?: QueryParamsHandling | null;\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    preserveFragment: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    skipLocationChange: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    replaceUrl: boolean;\r\n    /**\r\n     * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\r\n     * `NavigationBehaviorOptions`.\r\n     * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\r\n     * @see {@link Router#navigateByUrl Router#navigateByUrl}\r\n     */\r\n    state?: {\r\n        [k: string]: any;\r\n    };\r\n    /**\r\n     * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\r\n     * `UrlCreationOptions`.\r\n     * Specify a value here when you do not want to use the default value\r\n     * for `routerLink`, which is the current activated route.\r\n     * Note that a value of `undefined` here will use the `routerLink` default.\r\n     * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    relativeTo?: ActivatedRoute | null;\r\n    private commands;\r\n    private subscription;\r\n    private preserve;\r\n    href: string;\r\n    constructor(router: Router, route: ActivatedRoute, locationStrategy: LocationStrategy);\r\n    /**\r\n     * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\r\n     *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\r\n     *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\r\n     *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\r\n     * @see {@link Router#createUrlTree Router#createUrlTree}\r\n     */\r\n    set routerLink(commands: any[] | string | null | undefined);\r\n    /** @nodoc */\r\n    ngOnChanges(changes: SimpleChanges): any;\r\n    /** @nodoc */\r\n    ngOnDestroy(): any;\r\n    /** @nodoc */\r\n    onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean;\r\n    private updateTargetUrlAndHref;\r\n    get urlTree(): UrlTree;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Adds directives and providers for in-app navigation among views defined in an application.\r\n * Use the Angular `Router` service to declaratively specify application states and manage state\r\n * transitions.\r\n *\r\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\r\n * However, only one `Router` service can be active.\r\n * To ensure this, there are two ways to register routes when importing this module:\r\n *\r\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\r\n * routes, and the `Router` service itself.\r\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\r\n * routes, but does not include the `Router` service.\r\n *\r\n * @see [Routing and Navigation guide](guide/router) for an\r\n * overview of how the `Router` service should be used.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterModule {\r\n    constructor(guard: any, router: Router);\r\n    /**\r\n     * Creates and configures a module with all the router providers and directives.\r\n     * Optionally sets up an application listener to perform an initial navigation.\r\n     *\r\n     * When registering the NgModule at the root, import as follows:\r\n     *\r\n     * ```\r\n     * @NgModule({\r\n     *   imports: [RouterModule.forRoot(ROUTES)]\r\n     * })\r\n     * class MyNgModule {}\r\n     * ```\r\n     *\r\n     * @param routes An array of `Route` objects that define the navigation paths for the application.\r\n     * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\r\n     * @return The new `NgModule`.\r\n     *\r\n     */\r\n    static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule>;\r\n    /**\r\n     * Creates a module with all the router directives and a provider registering routes,\r\n     * without creating a new Router service.\r\n     * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\r\n     *\r\n     * ```\r\n     * @NgModule({\r\n     *   imports: [RouterModule.forChild(ROUTES)]\r\n     * })\r\n     * class MyNgModule {}\r\n     * ```\r\n     *\r\n     * @param routes An array of `Route` objects that define the navigation paths for the submodule.\r\n     * @return The new NgModule.\r\n     *\r\n     */\r\n    static forChild(routes: Routes): ModuleWithProviders<RouterModule>;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\r\n *\r\n * Each outlet can have a unique name, determined by the optional `name` attribute.\r\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\r\n *\r\n * ```\r\n * <router-outlet></router-outlet>\r\n * <router-outlet name='left'></router-outlet>\r\n * <router-outlet name='right'></router-outlet>\r\n * ```\r\n *\r\n * Named outlets can be the targets of secondary routes.\r\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\r\n *\r\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\r\n *\r\n * Using named outlets and secondary routes, you can target multiple outlets in\r\n * the same `RouterLink` directive.\r\n *\r\n * The router keeps track of separate branches in a navigation tree for each named outlet and\r\n * generates a representation of that tree in the URL.\r\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\r\n * routes at the same time:\r\n *\r\n * `http://base-path/primary-route-path(outlet-name:route-path)`\r\n *\r\n * A router outlet emits an activate event when a new component is instantiated,\r\n * and a deactivate event when a component is destroyed.\r\n *\r\n * ```\r\n * <router-outlet\r\n *   (activate)='onActivate($event)'\r\n *   (deactivate)='onDeactivate($event)'></router-outlet>\r\n * ```\r\n *\r\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\r\n * outlet and secondary route configuration\").\r\n * @see `RouterLink`\r\n * @see `Route`\r\n * @ngModule RouterModule\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {\r\n    private parentContexts;\r\n    private location;\r\n    private resolver;\r\n    private changeDetector;\r\n    private activated;\r\n    private _activatedRoute;\r\n    private name;\r\n    activateEvents: EventEmitter<any>;\r\n    deactivateEvents: EventEmitter<any>;\r\n    constructor(parentContexts: ChildrenOutletContexts, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string, changeDetector: ChangeDetectorRef);\r\n    /** @nodoc */\r\n    ngOnDestroy(): void;\r\n    /** @nodoc */\r\n    ngOnInit(): void;\r\n    get isActivated(): boolean;\r\n    /**\r\n     * @returns The currently activated component instance.\r\n     * @throws An error if the outlet is not activated.\r\n     */\r\n    get component(): Object;\r\n    get activatedRoute(): ActivatedRoute;\r\n    get activatedRouteData(): Data;\r\n    /**\r\n     * Called when the `RouteReuseStrategy` instructs to detach the subtree\r\n     */\r\n    detach(): ComponentRef<any>;\r\n    /**\r\n     * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\r\n     */\r\n    attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute): void;\r\n    deactivate(): void;\r\n    activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null): void;\r\n}\r\n\r\n/**\r\n * An interface that defines the contract for developing a component outlet for the `Router`.\r\n *\r\n * An outlet acts as a placeholder that Angular dynamically fills based on the current router state.\r\n *\r\n * A router outlet should register itself with the `Router` via\r\n * `ChildrenOutletContexts#onChildOutletCreated` and unregister with\r\n * `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,\r\n * it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.\r\n *\r\n * @see `ChildrenOutletContexts`\r\n * @publicApi\r\n */\r\nexport declare interface RouterOutletContract {\r\n    /**\r\n     * Whether the given outlet is activated.\r\n     *\r\n     * An outlet is considered \"activated\" if it has an active component.\r\n     */\r\n    isActivated: boolean;\r\n    /** The instance of the activated component or `null` if the outlet is not activated. */\r\n    component: Object | null;\r\n    /**\r\n     * The `Data` of the `ActivatedRoute` snapshot.\r\n     */\r\n    activatedRouteData: Data;\r\n    /**\r\n     * The `ActivatedRoute` for the outlet or `null` if the outlet is not activated.\r\n     */\r\n    activatedRoute: ActivatedRoute | null;\r\n    /**\r\n     * Called by the `Router` when the outlet should activate (create a component).\r\n     */\r\n    activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null): void;\r\n    /**\r\n     * A request to destroy the currently activated component.\r\n     *\r\n     * When a `RouteReuseStrategy` indicates that an `ActivatedRoute` should be removed but stored for\r\n     * later re-use rather than destroyed, the `Router` will call `detach` instead.\r\n     */\r\n    deactivate(): void;\r\n    /**\r\n     * Called when the `RouteReuseStrategy` instructs to detach the subtree.\r\n     *\r\n     * This is similar to `deactivate`, but the activated component should _not_ be destroyed.\r\n     * Instead, it is returned so that it can be reattached later via the `attach` method.\r\n     */\r\n    detach(): ComponentRef<unknown>;\r\n    /**\r\n     * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree.\r\n     */\r\n    attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;\r\n    /**\r\n     * Emits an activate event when a new component is instantiated\r\n     **/\r\n    activateEvents?: EventEmitter<unknown>;\r\n    /**\r\n     * Emits a deactivate event when a component is destroyed.\r\n     */\r\n    deactivateEvents?: EventEmitter<unknown>;\r\n}\r\n\r\n/**\r\n * The preloader optimistically loads all router configurations to\r\n * make navigations into lazily-loaded sections of the application faster.\r\n *\r\n * The preloader runs in the background. When the router bootstraps, the preloader\r\n * starts listening to all navigation events. After every such event, the preloader\r\n * will check if any configurations can be loaded lazily.\r\n *\r\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterPreloader implements OnDestroy {\r\n    private router;\r\n    private injector;\r\n    private preloadingStrategy;\r\n    private loader;\r\n    private subscription?;\r\n    constructor(router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, preloadingStrategy: PreloadingStrategy);\r\n    setUpPreloading(): void;\r\n    preload(): Observable<any>;\r\n    /** @nodoc */\r\n    ngOnDestroy(): void;\r\n    private processRoutes;\r\n    private preloadConfig;\r\n}\r\n\r\n/**\r\n * Represents the state of the router as a tree of activated routes.\r\n *\r\n * @usageNotes\r\n *\r\n * Every node in the route tree is an `ActivatedRoute` instance\r\n * that knows about the \"consumed\" URL segments, the extracted parameters,\r\n * and the resolved data.\r\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\r\n *\r\n * The following fragment shows how a component gets the root node\r\n * of the current state to establish its own route tree:\r\n *\r\n * ```\r\n * @Component({templateUrl:'template.html'})\r\n * class MyComponent {\r\n *   constructor(router: Router) {\r\n *     const state: RouterState = router.routerState;\r\n *     const root: ActivatedRoute = state.root;\r\n *     const child = root.firstChild;\r\n *     const id: Observable<string> = child.params.map(p => p.id);\r\n *     //...\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @see `ActivatedRoute`\r\n * @see [Getting route information](guide/router#getting-route-information)\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterState extends ɵangular_packages_router_router_m<ActivatedRoute> {\r\n    /** The current snapshot of the router state */\r\n    snapshot: RouterStateSnapshot;\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Represents the state of the router at a moment in time.\r\n *\r\n * This is a tree of activated route snapshots. Every node in this tree knows about\r\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\r\n *\r\n * The following example shows how a component is initialized with information\r\n * from the snapshot of the root node's state at the time of creation.\r\n *\r\n * ```\r\n * @Component({templateUrl:'template.html'})\r\n * class MyComponent {\r\n *   constructor(router: Router) {\r\n *     const state: RouterState = router.routerState;\r\n *     const snapshot: RouterStateSnapshot = state.snapshot;\r\n *     const root: ActivatedRouteSnapshot = snapshot.root;\r\n *     const child = root.firstChild;\r\n *     const id: Observable<string> = child.params.map(p => p.id);\r\n *     //...\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterStateSnapshot extends ɵangular_packages_router_router_m<ActivatedRouteSnapshot> {\r\n    /** The url from which this snapshot was created */\r\n    url: string;\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * The [DI token](guide/glossary/#di-token) for a router configuration.\r\n *\r\n * `ROUTES` is a low level API for router configuration via dependency injection.\r\n *\r\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\r\n * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.\r\n *\r\n * @publicApi\r\n */\r\nexport declare const ROUTES: InjectionToken<Route[][]>;\r\n\r\n/**\r\n * Represents a route configuration for the Router service.\r\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\r\n * in `Route.children`.\r\n *\r\n * @see `Route`\r\n * @see `Router`\r\n * @see [Router configuration guide](guide/router-reference#configuration)\r\n * @publicApi\r\n */\r\nexport declare type Routes = Route[];\r\n\r\n/**\r\n * An event triggered when routes are recognized.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RoutesRecognized extends RouterEvent {\r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string;\r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    id: number, \r\n    /** @docsNotRequired */\r\n    url: string, \r\n    /** @docsNotRequired */\r\n    urlAfterRedirects: string, \r\n    /** @docsNotRequired */\r\n    state: RouterStateSnapshot);\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n *\r\n * A policy for when to run guards and resolvers on a route.\r\n *\r\n * @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)\r\n * @publicApi\r\n */\r\nexport declare type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' | 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' | ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\r\n\r\n/**\r\n * An event triggered by scrolling.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class Scroll {\r\n    /** @docsNotRequired */\r\n    readonly routerEvent: NavigationEnd;\r\n    /** @docsNotRequired */\r\n    readonly position: [number, number] | null;\r\n    /** @docsNotRequired */\r\n    readonly anchor: string | null;\r\n    constructor(\r\n    /** @docsNotRequired */\r\n    routerEvent: NavigationEnd, \r\n    /** @docsNotRequired */\r\n    position: [number, number] | null, \r\n    /** @docsNotRequired */\r\n    anchor: string | null);\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Options that modify the `Router` URL.\r\n * Supply an object containing any of these properties to a `Router` navigation function to\r\n * control how the target URL should be constructed.\r\n *\r\n * @see [Router.navigate() method](api/router/Router#navigate)\r\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\r\n * @see [Routing and Navigation guide](guide/router)\r\n *\r\n * @publicApi\r\n */\r\nexport declare interface UrlCreationOptions {\r\n    /**\r\n     * Specifies a root URI to use for relative navigation.\r\n     *\r\n     * For example, consider the following route configuration where the parent route\r\n     * has two children.\r\n     *\r\n     * ```\r\n     * [{\r\n     *   path: 'parent',\r\n     *   component: ParentComponent,\r\n     *   children: [{\r\n     *     path: 'list',\r\n     *     component: ListComponent\r\n     *   },{\r\n     *     path: 'child',\r\n     *     component: ChildComponent\r\n     *   }]\r\n     * }]\r\n     * ```\r\n     *\r\n     * The following `go()` function navigates to the `list` route by\r\n     * interpreting the destination URI as relative to the activated `child`  route\r\n     *\r\n     * ```\r\n     *  @Component({...})\r\n     *  class ChildComponent {\r\n     *    constructor(private router: Router, private route: ActivatedRoute) {}\r\n     *\r\n     *    go() {\r\n     *      this.router.navigate(['../list'], { relativeTo: this.route });\r\n     *    }\r\n     *  }\r\n     * ```\r\n     *\r\n     * A value of `null` or `undefined` indicates that the navigation commands should be applied\r\n     * relative to the root.\r\n     */\r\n    relativeTo?: ActivatedRoute | null;\r\n    /**\r\n     * Sets query parameters to the URL.\r\n     *\r\n     * ```\r\n     * // Navigate to /results?page=1\r\n     * this.router.navigate(['/results'], { queryParams: { page: 1 } });\r\n     * ```\r\n     */\r\n    queryParams?: Params | null;\r\n    /**\r\n     * Sets the hash fragment for the URL.\r\n     *\r\n     * ```\r\n     * // Navigate to /results#top\r\n     * this.router.navigate(['/results'], { fragment: 'top' });\r\n     * ```\r\n     */\r\n    fragment?: string;\r\n    /**\r\n     * How to handle query parameters in the router link for the next navigation.\r\n     * One of:\r\n     * * `preserve` : Preserve current parameters.\r\n     * * `merge` : Merge new with current parameters.\r\n     *\r\n     * The \"preserve\" option discards any new query params:\r\n     * ```\r\n     * // from /view1?page=1 to/view2?page=1\r\n     * this.router.navigate(['/view2'], { queryParams: { page: 2 },  queryParamsHandling: \"preserve\"\r\n     * });\r\n     * ```\r\n     * The \"merge\" option appends new query params to the params from the current URL:\r\n     * ```\r\n     * // from /view1?page=1 to/view2?page=1&otherKey=2\r\n     * this.router.navigate(['/view2'], { queryParams: { otherKey: 2 },  queryParamsHandling: \"merge\"\r\n     * });\r\n     * ```\r\n     * In case of a key collision between current parameters and those in the `queryParams` object,\r\n     * the new value is used.\r\n     *\r\n     */\r\n    queryParamsHandling?: QueryParamsHandling | null;\r\n    /**\r\n     * When true, preserves the URL fragment for the next navigation\r\n     *\r\n     * ```\r\n     * // Preserve fragment from /results#top to /view#top\r\n     * this.router.navigate(['/view'], { preserveFragment: true });\r\n     * ```\r\n     */\r\n    preserveFragment?: boolean;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Provides a way to migrate AngularJS applications to Angular.\r\n *\r\n * @publicApi\r\n */\r\nexport declare abstract class UrlHandlingStrategy {\r\n    /**\r\n     * Tells the router if this URL should be processed.\r\n     *\r\n     * When it returns true, the router will execute the regular navigation.\r\n     * When it returns false, the router will set the router state to an empty state.\r\n     * As a result, all the active components will be destroyed.\r\n     *\r\n     */\r\n    abstract shouldProcessUrl(url: UrlTree): boolean;\r\n    /**\r\n     * Extracts the part of the URL that should be handled by the router.\r\n     * The rest of the URL will remain untouched.\r\n     */\r\n    abstract extract(url: UrlTree): UrlTree;\r\n    /**\r\n     * Merges the URL fragment with the rest of the URL.\r\n     */\r\n    abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\r\n}\r\n\r\n/**\r\n * A function for matching a route against URLs. Implement a custom URL matcher\r\n * for `Route.matcher` when a combination of `path` and `pathMatch`\r\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\r\n *\r\n * The function takes the following arguments and returns a `UrlMatchResult` object.\r\n * * *segments* : An array of URL segments.\r\n * * *group* : A segment group.\r\n * * *route* : The route to match against.\r\n *\r\n * The following example implementation matches HTML files.\r\n *\r\n * ```\r\n * export function htmlFiles(url: UrlSegment[]) {\r\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\r\n * }\r\n *\r\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult | null;\r\n\r\n/**\r\n * Represents the result of matching URLs with a custom matching function.\r\n *\r\n * * `consumed` is an array of the consumed URL segments.\r\n * * `posParams` is a map of positional parameters.\r\n *\r\n * @see `UrlMatcher()`\r\n * @publicApi\r\n */\r\nexport declare type UrlMatchResult = {\r\n    consumed: UrlSegment[];\r\n    posParams?: {\r\n        [name: string]: UrlSegment;\r\n    };\r\n};\r\n\r\n/**\r\n * @description\r\n *\r\n * Represents a single URL segment.\r\n *\r\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\r\n * parameters associated with the segment.\r\n *\r\n * @usageNotes\r\n * ### Example\r\n *\r\n * ```\r\n * @Component({templateUrl:'template.html'})\r\n * class MyComponent {\r\n *   constructor(router: Router) {\r\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\r\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\r\n *     const s: UrlSegment[] = g.segments;\r\n *     s[0].path; // returns 'team'\r\n *     s[0].parameters; // returns {id: 33}\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class UrlSegment {\r\n    /** The path part of a URL segment */\r\n    path: string;\r\n    /** The matrix parameters associated with a segment */\r\n    parameters: {\r\n        [name: string]: string;\r\n    };\r\n    constructor(\r\n    /** The path part of a URL segment */\r\n    path: string, \r\n    /** The matrix parameters associated with a segment */\r\n    parameters: {\r\n        [name: string]: string;\r\n    });\r\n    get parameterMap(): ParamMap;\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Represents the parsed URL segment group.\r\n *\r\n * See `UrlTree` for more information.\r\n *\r\n * @publicApi\r\n */\r\nexport declare class UrlSegmentGroup {\r\n    /** The URL segments of this group. See `UrlSegment` for more information */\r\n    segments: UrlSegment[];\r\n    /** The list of children of this group */\r\n    children: {\r\n        [key: string]: UrlSegmentGroup;\r\n    };\r\n    /** The parent node in the url tree */\r\n    parent: UrlSegmentGroup | null;\r\n    constructor(\r\n    /** The URL segments of this group. See `UrlSegment` for more information */\r\n    segments: UrlSegment[], \r\n    /** The list of children of this group */\r\n    children: {\r\n        [key: string]: UrlSegmentGroup;\r\n    });\r\n    /** Whether the segment has child segments */\r\n    hasChildren(): boolean;\r\n    /** Number of child segments */\r\n    get numberOfChildren(): number;\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Serializes and deserializes a URL string into a URL tree.\r\n *\r\n * The url serialization strategy is customizable. You can\r\n * make all URLs case insensitive by providing a custom UrlSerializer.\r\n *\r\n * See `DefaultUrlSerializer` for an example of a URL serializer.\r\n *\r\n * @publicApi\r\n */\r\nexport declare abstract class UrlSerializer {\r\n    /** Parse a url into a `UrlTree` */\r\n    abstract parse(url: string): UrlTree;\r\n    /** Converts a `UrlTree` into a url */\r\n    abstract serialize(tree: UrlTree): string;\r\n}\r\n\r\n/**\r\n * @description\r\n *\r\n * Represents the parsed URL.\r\n *\r\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\r\n * serialized tree.\r\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\r\n *\r\n * @usageNotes\r\n * ### Example\r\n *\r\n * ```\r\n * @Component({templateUrl:'template.html'})\r\n * class MyComponent {\r\n *   constructor(router: Router) {\r\n *     const tree: UrlTree =\r\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\r\n *     const f = tree.fragment; // return 'fragment'\r\n *     const q = tree.queryParams; // returns {debug: 'true'}\r\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\r\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\r\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\r\n *     g.children['support'].segments; // return 1 segment 'help'\r\n *   }\r\n * }\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class UrlTree {\r\n    /** The root segment group of the URL tree */\r\n    root: UrlSegmentGroup;\r\n    /** The query params of the URL */\r\n    queryParams: Params;\r\n    /** The fragment of the URL */\r\n    fragment: string | null;\r\n    get queryParamMap(): ParamMap;\r\n    /** @docsNotRequired */\r\n    toString(): string;\r\n}\r\n\r\n/**\r\n * @publicApi\r\n */\r\nexport declare const VERSION: Version;\r\n\r\n/**\r\n * @docsNotRequired\r\n */\r\nexport declare const ɵangular_packages_router_router_a: InjectionToken<void>;\r\n\r\nexport declare function ɵangular_packages_router_router_b(): NgProbeToken;\r\n\r\nexport declare function ɵangular_packages_router_router_c(router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): ɵangular_packages_router_router_o;\r\n\r\nexport declare function ɵangular_packages_router_router_d(platformLocationStrategy: PlatformLocation, baseHref: string, options?: ExtraOptions): HashLocationStrategy | PathLocationStrategy;\r\n\r\nexport declare function ɵangular_packages_router_router_e(router: Router): any;\r\n\r\nexport declare function ɵangular_packages_router_router_f(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location_2, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][], opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy, routeReuseStrategy?: RouteReuseStrategy): Router;\r\n\r\nexport declare function ɵangular_packages_router_router_g(router: Router): ActivatedRoute;\r\n\r\n/**\r\n * Router initialization requires two steps:\r\n *\r\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\r\n * a resolver or a guard executes asynchronously.\r\n *\r\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\r\n * `afterPreactivation` hook provided by the router.\r\n * The router navigation starts, reaches the point when preactivation is done, and then\r\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\r\n */\r\nexport declare class ɵangular_packages_router_router_h implements OnDestroy {\r\n    private injector;\r\n    private initNavigation;\r\n    private destroyed;\r\n    private resultOfPreactivationDone;\r\n    constructor(injector: Injector);\r\n    appInitializer(): Promise<any>;\r\n    bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void;\r\n    ngOnDestroy(): void;\r\n}\r\n\r\nexport declare function ɵangular_packages_router_router_i(r: ɵangular_packages_router_router_h): () => Promise<any>;\r\n\r\nexport declare function ɵangular_packages_router_router_j(r: ɵangular_packages_router_router_h): (bootstrappedComponentRef: ComponentRef<any>) => void;\r\n\r\nexport declare function ɵangular_packages_router_router_k(): ReadonlyArray<Provider>;\r\n\r\n\r\nexport declare class ɵangular_packages_router_router_m<T> {\r\n    constructor(root: ɵangular_packages_router_router_n<T>);\r\n    get root(): T;\r\n}\r\n\r\nexport declare class ɵangular_packages_router_router_n<T> {\r\n    value: T;\r\n    children: ɵangular_packages_router_router_n<T>[];\r\n    constructor(value: T, children: ɵangular_packages_router_router_n<T>[]);\r\n    toString(): string;\r\n}\r\n\r\nexport declare class ɵangular_packages_router_router_o implements OnDestroy {\r\n    private router;\r\n    /** @docsNotRequired */ readonly viewportScroller: ViewportScroller;\r\n    private options;\r\n    private routerEventsSubscription;\r\n    private scrollEventsSubscription;\r\n    private lastId;\r\n    private lastSource;\r\n    private restoredId;\r\n    private store;\r\n    constructor(router: Router, \r\n    /** @docsNotRequired */ viewportScroller: ViewportScroller, options?: {\r\n        scrollPositionRestoration?: 'disabled' | 'enabled' | 'top';\r\n        anchorScrolling?: 'disabled' | 'enabled';\r\n    });\r\n    init(): void;\r\n    private createScrollEvents;\r\n    private consumeScrollEvents;\r\n    private scheduleScrollEvent;\r\n    /** @nodoc */\r\n    ngOnDestroy(): void;\r\n}\r\n\r\nexport declare function ɵassignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void;\r\n\r\n\r\n/**\r\n * This component is used internally within the router to be a placeholder when an empty\r\n * router-outlet is needed. For example, with a config such as:\r\n *\r\n * `{path: 'parent', outlet: 'nav', children: [...]}`\r\n *\r\n * In order to render, there needs to be a component on this config, which will default\r\n * to this `EmptyOutletComponent`.\r\n */\r\ndeclare class ɵEmptyOutletComponent {\r\n}\r\nexport { ɵEmptyOutletComponent }\r\nexport { ɵEmptyOutletComponent as ɵangular_packages_router_router_l }\r\n\r\n/**\r\n * Flattens single-level nested arrays.\r\n */\r\nexport declare function ɵflatten<T>(arr: T[][]): T[];\r\n\r\nexport declare const ɵROUTER_PROVIDERS: Provider[];\r\n\r\nexport { }\r\n"]}
Index: trip-planner-front/node_modules/@angular/router/router.metadata.json
===================================================================
--- trip-planner-front/node_modules/@angular/router/router.metadata.json	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/router.metadata.json	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,1 +1,1 @@
-{"__symbolic":"module","version":4,"metadata":{"ɵangular_packages_router_router_a":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":45,"character":40},"arguments":["ROUTER_FORROOT_GUARD"]},"ɵangular_packages_router_router_b":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken","line":69,"character":13},"arguments":["Router",{"__symbolic":"reference","name":"Router"}]}},"ɵangular_packages_router_router_c":{"__symbolic":"function"},"ɵangular_packages_router_router_d":{"__symbolic":"function","parameters":["platformLocationStrategy","baseHref","options"],"defaults":[null,null,{}],"value":{"__symbolic":"if","condition":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"useHash"},"thenExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"HashLocationStrategy","line":185,"character":31},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]},"elseExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"PathLocationStrategy","line":186,"character":31},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]}}},"ɵangular_packages_router_router_e":{"__symbolic":"function"},"ɵangular_packages_router_router_f":{"__symbolic":"function"},"ɵangular_packages_router_router_g":{"__symbolic":"function","parameters":["router"],"value":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"router"},"member":"routerState"},"member":"root"}},"ɵangular_packages_router_router_h":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":504,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":510,"character":32}]}],"appInitializer":[{"__symbolic":"method"}],"bootstrapListener":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_i":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"appInitializer"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"ɵangular_packages_router_router_j":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"bootstrapListener"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"ɵangular_packages_router_router_k":{"__symbolic":"function","parameters":[],"value":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_INITIALIZER","line":601,"character":15},"multi":true,"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_i"},"deps":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"}]},{"provide":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_j"},"deps":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER","line":607,"character":14},"multi":true,"useExisting":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"}}]},"ɵangular_packages_router_router_l":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":19,"character":1},"arguments":[{"template":"<router-outlet></router-outlet>"}]}],"members":{}},"Data":{"__symbolic":"interface"},"DeprecatedLoadChildren":{"__symbolic":"interface"},"LoadChildren":{"__symbolic":"interface"},"LoadChildrenCallback":{"__symbolic":"interface"},"QueryParamsHandling":{"__symbolic":"interface"},"ResolveData":{"__symbolic":"interface"},"Route":{"__symbolic":"interface"},"Routes":{"__symbolic":"interface"},"RunGuardsAndResolvers":{"__symbolic":"interface"},"UrlMatcher":{"__symbolic":"interface"},"UrlMatchResult":{"__symbolic":"interface"},"RouterLink":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":117,"character":1},"arguments":[{"selector":":not(a):not(area)[routerLink]"}]}],"members":{"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":125,"character":3}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":132,"character":3}}]}],"queryParamsHandling":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":139,"character":3}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":147,"character":3}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":155,"character":3}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":163,"character":3}}]}],"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":170,"character":3}}]}],"relativeTo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":180,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":190,"character":7},"arguments":["tabindex"]}],null,null],"parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","name":"ActivatedRoute"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":190,"character":57},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":190,"character":72}]}],"ngOnChanges":[{"__symbolic":"method"}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":210,"character":3}}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":220,"character":3},"arguments":["click"]}]}]}},"RouterLinkWithHref":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":255,"character":1},"arguments":[{"selector":"a[routerLink],area[routerLink]"}]}],"members":{"target":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":258,"character":3},"arguments":["attr.target"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":258,"character":31}}]}],"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":265,"character":3}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":272,"character":3}}]}],"queryParamsHandling":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":279,"character":3}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":287,"character":3}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":295,"character":3}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":303,"character":3}}]}],"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":310,"character":3}}]}],"relativeTo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":320,"character":3}}]}],"href":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":329,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","name":"ActivatedRoute"},{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy","line":336,"character":32}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":351,"character":3}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":371,"character":3},"arguments":["click",["$event.button","$event.ctrlKey","$event.shiftKey","$event.altKey","$event.metaKey"]]}]}],"updateTargetUrlAndHref":[{"__symbolic":"method"}]}},"RouterLinkActive":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":78,"character":1},"arguments":[{"selector":"[routerLinkActive]","exportAs":"routerLinkActive"}]}],"members":{"links":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":83,"character":3},"arguments":[{"__symbolic":"reference","name":"RouterLink"},{"descendants":true}]}]}],"linksWithHrefs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":84,"character":3},"arguments":[{"__symbolic":"reference","name":"RouterLinkWithHref"},{"descendants":true}]}]}],"routerLinkActiveOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":99,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":104,"character":48}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":105,"character":7}}]],"parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":103,"character":47},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":103,"character":77},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":104,"character":28},{"__symbolic":"reference","name":"RouterLink"},{"__symbolic":"reference","name":"RouterLinkWithHref"}]}],"ngAfterContentInit":[{"__symbolic":"method"}],"subscribeToEachLinkOnChanges":[{"__symbolic":"method"}],"routerLinkActive":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":135,"character":3}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"isLinkActive":[{"__symbolic":"method"}],"hasActiveLinks":[{"__symbolic":"method"}]}},"RouterOutlet":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":131,"character":1},"arguments":[{"selector":"router-outlet","exportAs":"outlet"}]}],"members":{"activateEvents":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":137,"character":3},"arguments":["activate"]}]}],"deactivateEvents":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":138,"character":3},"arguments":["deactivate"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":142,"character":51},"arguments":["name"]}],null],"parameters":[{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":141,"character":72},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":142,"character":24},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":143,"character":30}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"detach":[{"__symbolic":"method"}],"attach":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"activateWith":[{"__symbolic":"method"}]}},"RouterOutletContract":{"__symbolic":"interface"},"ActivationEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ActivationStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ChildActivationEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ChildActivationStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"Event":{"__symbolic":"interface"},"GuardsCheckEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"},{"__symbolic":"reference","name":"boolean"}]}],"toString":[{"__symbolic":"method"}]}},"GuardsCheckStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationCancel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationError":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"any"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":95,"character":25,"module":"./router"},{"__symbolic":"error","message":"Expression form not supported","line":97,"character":21,"module":"./router"}]}],"toString":[{"__symbolic":"method"}]}},"ResolveEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ResolveStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"RouteConfigLoadEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Route"}]}],"toString":[{"__symbolic":"method"}]}},"RouteConfigLoadStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Route"}]}],"toString":[{"__symbolic":"method"}]}},"RouterEvent":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"}]}]}},"RoutesRecognized":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"Scroll":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"NavigationEnd"},{"__symbolic":"error","message":"Expression form not supported","line":437,"character":25,"module":"./router"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"CanActivate":{"__symbolic":"interface"},"CanActivateChild":{"__symbolic":"interface"},"CanDeactivate":{"__symbolic":"interface"},"CanLoad":{"__symbolic":"interface"},"Resolve":{"__symbolic":"interface"},"BaseRouteReuseStrategy":{"__symbolic":"class","members":{"shouldDetach":[{"__symbolic":"method"}],"store":[{"__symbolic":"method"}],"shouldAttach":[{"__symbolic":"method"}],"retrieve":[{"__symbolic":"method"}],"shouldReuseRoute":[{"__symbolic":"method"}]}},"DetachedRouteHandle":{"__symbolic":"interface"},"RouteReuseStrategy":{"__symbolic":"class","members":{"shouldDetach":[{"__symbolic":"method"}],"store":[{"__symbolic":"method"}],"shouldAttach":[{"__symbolic":"method"}],"retrieve":[{"__symbolic":"method"}],"shouldReuseRoute":[{"__symbolic":"method"}]}},"Navigation":{"__symbolic":"interface"},"NavigationBehaviorOptions":{"__symbolic":"interface"},"NavigationExtras":{"__symbolic":"interface"},"Router":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":397,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"UrlSerializer"},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":592,"character":70},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":592,"character":90},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":593,"character":14},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":593,"character":47},{"__symbolic":"reference","name":"Routes"}]}],"setupNavigations":[{"__symbolic":"method"}],"resetRootComponentType":[{"__symbolic":"method"}],"getTransition":[{"__symbolic":"method"}],"setTransition":[{"__symbolic":"method"}],"initialNavigation":[{"__symbolic":"method"}],"setUpLocationChangeListener":[{"__symbolic":"method"}],"extractLocationChangeInfoFromEvent":[{"__symbolic":"method"}],"shouldScheduleNavigation":[{"__symbolic":"method"}],"getCurrentNavigation":[{"__symbolic":"method"}],"triggerEvent":[{"__symbolic":"method"}],"resetConfig":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"createUrlTree":[{"__symbolic":"method"}],"navigateByUrl":[{"__symbolic":"method"}],"navigate":[{"__symbolic":"method"}],"serializeUrl":[{"__symbolic":"method"}],"parseUrl":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"removeEmptyProps":[{"__symbolic":"method"}],"processNavigations":[{"__symbolic":"method"}],"scheduleNavigation":[{"__symbolic":"method"}],"setBrowserUrl":[{"__symbolic":"method"}],"restoreHistory":[{"__symbolic":"method"}],"resetState":[{"__symbolic":"method"}],"resetUrlToCurrentUrlTree":[{"__symbolic":"method"}],"cancelNavigationTransition":[{"__symbolic":"method"}],"generateNgRouterState":[{"__symbolic":"method"}]}},"UrlCreationOptions":{"__symbolic":"interface"},"ROUTES":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":26,"character":26},"arguments":["ROUTES"]},"ExtraOptions":{"__symbolic":"interface"},"InitialNavigation":{"__symbolic":"interface"},"provideRoutes":{"__symbolic":"function","parameters":["routes"],"value":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"ANALYZE_FOR_ENTRY_COMPONENTS","line":215,"character":14},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}},{"provide":{"__symbolic":"reference","name":"ROUTES"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}}]},"ROUTER_CONFIGURATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":40,"character":40},"arguments":["ROUTER_CONFIGURATION"]},"ROUTER_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":595,"character":8},"arguments":["Router Initializer"]},"RouterModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":93,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"RouterOutlet"},{"__symbolic":"reference","name":"RouterLink"},{"__symbolic":"reference","name":"RouterLinkWithHref"},{"__symbolic":"reference","name":"RouterLinkActive"},{"__symbolic":"reference","name":"ɵangular_packages_router_router_l"}],"exports":[{"__symbolic":"reference","name":"RouterOutlet"},{"__symbolic":"reference","name":"RouterLink"},{"__symbolic":"reference","name":"RouterLinkWithHref"},{"__symbolic":"reference","name":"RouterLinkActive"},{"__symbolic":"reference","name":"ɵangular_packages_router_router_l"}],"entryComponents":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_l"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":100,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":100,"character":27},"arguments":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_a"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":100,"character":69}}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"Router"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["routes","config"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"reference","name":"ɵROUTER_PROVIDERS"},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]},{"provide":{"__symbolic":"reference","name":"ɵangular_packages_router_router_a"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_e"},"deps":[[{"__symbolic":"reference","name":"Router"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":129,"character":30}},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":129,"character":46}}]]},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"config"},"thenExpression":{"__symbolic":"reference","name":"config"},"elseExpression":{}}},{"provide":{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy","line":133,"character":19},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_d"},"deps":[{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation","line":136,"character":15},[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":136,"character":38},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"APP_BASE_HREF","line":136,"character":45}]},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":136,"character":65}}],{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","name":"ɵangular_packages_router_router_o"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_c"},"deps":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/common","name":"ViewportScroller","line":141,"character":25},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","name":"PreloadingStrategy"},"useExisting":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"reference","name":"config"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"}},"thenExpression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"},"elseExpression":{"__symbolic":"reference","name":"NoPreloading"}}},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken","line":148,"character":18},"multi":true,"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_b"}},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"ɵangular_packages_router_router_k"}}]}},"forChild":{"__symbolic":"function","parameters":["routes"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]}]}}}},"ChildrenOutletContexts":{"__symbolic":"class","members":{"onChildOutletCreated":[{"__symbolic":"method"}],"onChildOutletDestroyed":[{"__symbolic":"method"}],"onOutletDeactivated":[{"__symbolic":"method"}],"onOutletReAttached":[{"__symbolic":"method"}],"getOrCreateContext":[{"__symbolic":"method"}],"getContext":[{"__symbolic":"method"}]}},"OutletContext":{"__symbolic":"class","members":{}},"NoPreloading":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"PreloadAllModules":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"PreloadingStrategy":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"RouterPreloader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":73,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":79,"character":44},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":79,"character":77},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":80,"character":24},{"__symbolic":"reference","name":"PreloadingStrategy"}]}],"setUpPreloading":[{"__symbolic":"method"}],"preload":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"processRoutes":[{"__symbolic":"method"}],"preloadConfig":[{"__symbolic":"method"}]}},"ActivatedRoute":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ActivatedRouteSnapshot":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"UrlSegment"}]},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Data"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Route"},{"__symbolic":"reference","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"ResolveData"}]}],"toString":[{"__symbolic":"method"}]}},"RouterState":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_n"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"RouterStateSnapshot":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"ɵangular_packages_router_router_n"}]}],"toString":[{"__symbolic":"method"}]}},"convertToParamMap":{"__symbolic":"function","parameters":["params"],"value":{"__symbolic":"error","message":"Reference to non-exported class","line":68,"character":0,"context":{"className":"ParamsAsMap"},"module":"./router"}},"ParamMap":{"__symbolic":"interface"},"Params":{"__symbolic":"interface"},"PRIMARY_OUTLET":"primary","UrlHandlingStrategy":{"__symbolic":"class","members":{"shouldProcessUrl":[{"__symbolic":"method"}],"extract":[{"__symbolic":"method"}],"merge":[{"__symbolic":"method"}]}},"DefaultUrlSerializer":{"__symbolic":"class","members":{"parse":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}]}},"IsActiveMatchOptions":{"__symbolic":"interface"},"UrlSegment":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":293,"character":25,"module":"./router"}]}],"toString":[{"__symbolic":"method"}]}},"UrlSegmentGroup":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"UrlSegment"}]},{"__symbolic":"error","message":"Expression form not supported","line":236,"character":23,"module":"./router"}]}],"hasChildren":[{"__symbolic":"method"}],"toString":[{"__symbolic":"method"}]}},"UrlSerializer":{"__symbolic":"class","members":{"parse":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}]}},"UrlTree":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version","line":19,"character":27},"arguments":["12.2.9"]},"ɵassignExtraOptionsToRouter":{"__symbolic":"function"},"ɵROUTER_PROVIDERS":[{"__symbolic":"reference","module":"@angular/common","name":"Location","line":48,"character":2},{"provide":{"__symbolic":"reference","name":"UrlSerializer"},"useClass":{"__symbolic":"reference","name":"DefaultUrlSerializer"}},{"provide":{"__symbolic":"reference","name":"Router"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_f"},"deps":[{"__symbolic":"reference","name":"UrlSerializer"},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":54,"character":45},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":54,"character":55},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":54,"character":65},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":54,"character":88},{"__symbolic":"reference","name":"ROUTES"},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},[{"__symbolic":"reference","name":"UrlHandlingStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":55,"character":62}}],[{"__symbolic":"reference","name":"RouteReuseStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":56,"character":31}}]]},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"provide":{"__symbolic":"reference","name":"ActivatedRoute"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_g"},"deps":[{"__symbolic":"reference","name":"Router"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":61,"character":12},"useClass":{"__symbolic":"reference","module":"@angular/core","name":"SystemJsNgModuleLoader","line":61,"character":45}},{"__symbolic":"reference","name":"RouterPreloader"},{"__symbolic":"reference","name":"NoPreloading"},{"__symbolic":"reference","name":"PreloadAllModules"},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"enableTracing":false}}],"ɵflatten":{"__symbolic":"function","parameters":["arr"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"prototype"},"member":"concat"},"member":"apply"},"arguments":[[],{"__symbolic":"reference","name":"arr"}]}},"ɵangular_packages_router_router_m":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_n"}]}],"parent":[{"__symbolic":"method"}],"children":[{"__symbolic":"method"}],"firstChild":[{"__symbolic":"method"}],"siblings":[{"__symbolic":"method"}],"pathFromRoot":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_n":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":92,"character":28,"context":{"typeName":"T"},"module":"./router"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_n"}]}]}],"toString":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_o":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":15,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/common","name":"ViewportScroller","line":29,"character":64},{"__symbolic":"error","message":"Expression form not supported","line":29,"character":99,"module":"./router"}]}],"init":[{"__symbolic":"method"}],"createScrollEvents":[{"__symbolic":"method"}],"consumeScrollEvents":[{"__symbolic":"method"}],"scheduleScrollEvent":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"ɵangular_packages_router_router_a":"./router","ɵangular_packages_router_router_b":"./router","ɵangular_packages_router_router_c":"./router","ɵangular_packages_router_router_d":"./router","ɵangular_packages_router_router_e":"./router","ɵangular_packages_router_router_f":"./router","ɵangular_packages_router_router_g":"./router","ɵangular_packages_router_router_h":"./router","ɵangular_packages_router_router_i":"./router","ɵangular_packages_router_router_j":"./router","ɵangular_packages_router_router_k":"./router","ɵangular_packages_router_router_l":"./router","Data":"./router","DeprecatedLoadChildren":"./router","LoadChildren":"./router","LoadChildrenCallback":"./router","QueryParamsHandling":"./router","ResolveData":"./router","Route":"./router","Routes":"./router","RunGuardsAndResolvers":"./router","UrlMatcher":"./router","UrlMatchResult":"./router","RouterLink":"./router","RouterLinkWithHref":"./router","RouterLinkActive":"./router","RouterOutlet":"./router","RouterOutletContract":"./router","ActivationEnd":"./router","ActivationStart":"./router","ChildActivationEnd":"./router","ChildActivationStart":"./router","Event":"./router","GuardsCheckEnd":"./router","GuardsCheckStart":"./router","NavigationCancel":"./router","NavigationEnd":"./router","NavigationError":"./router","NavigationStart":"./router","ResolveEnd":"./router","ResolveStart":"./router","RouteConfigLoadEnd":"./router","RouteConfigLoadStart":"./router","RouterEvent":"./router","RoutesRecognized":"./router","Scroll":"./router","CanActivate":"./router","CanActivateChild":"./router","CanDeactivate":"./router","CanLoad":"./router","Resolve":"./router","BaseRouteReuseStrategy":"./router","DetachedRouteHandle":"./router","RouteReuseStrategy":"./router","Navigation":"./router","NavigationBehaviorOptions":"./router","NavigationExtras":"./router","Router":"./router","UrlCreationOptions":"./router","ROUTES":"./router","ExtraOptions":"./router","InitialNavigation":"./router","provideRoutes":"./router","ROUTER_CONFIGURATION":"./router","ROUTER_INITIALIZER":"./router","RouterModule":"./router","ChildrenOutletContexts":"./router","OutletContext":"./router","NoPreloading":"./router","PreloadAllModules":"./router","PreloadingStrategy":"./router","RouterPreloader":"./router","ActivatedRoute":"./router","ActivatedRouteSnapshot":"./router","RouterState":"./router","RouterStateSnapshot":"./router","convertToParamMap":"./router","ParamMap":"./router","Params":"./router","PRIMARY_OUTLET":"./router","UrlHandlingStrategy":"./router","DefaultUrlSerializer":"./router","IsActiveMatchOptions":"./router","UrlSegment":"./router","UrlSegmentGroup":"./router","UrlSerializer":"./router","UrlTree":"./router","VERSION":"./router","ɵEmptyOutletComponent":"./router","ɵassignExtraOptionsToRouter":"./router","ɵROUTER_PROVIDERS":"./router","ɵflatten":"./router","ɵangular_packages_router_router_m":"./router","ɵangular_packages_router_router_n":"./router","ɵangular_packages_router_router_o":"./router"},"importAs":"@angular/router"}
+{"__symbolic":"module","version":4,"metadata":{"ɵangular_packages_router_router_a":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":45,"character":40},"arguments":["ROUTER_FORROOT_GUARD"]},"ɵangular_packages_router_router_b":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken","line":69,"character":13},"arguments":["Router",{"__symbolic":"reference","name":"Router"}]}},"ɵangular_packages_router_router_c":{"__symbolic":"function"},"ɵangular_packages_router_router_d":{"__symbolic":"function","parameters":["platformLocationStrategy","baseHref","options"],"defaults":[null,null,{}],"value":{"__symbolic":"if","condition":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"useHash"},"thenExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"HashLocationStrategy","line":185,"character":31},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]},"elseExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"PathLocationStrategy","line":186,"character":31},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]}}},"ɵangular_packages_router_router_e":{"__symbolic":"function"},"ɵangular_packages_router_router_f":{"__symbolic":"function"},"ɵangular_packages_router_router_g":{"__symbolic":"function","parameters":["router"],"value":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"router"},"member":"routerState"},"member":"root"}},"ɵangular_packages_router_router_h":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":504,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":510,"character":32}]}],"appInitializer":[{"__symbolic":"method"}],"bootstrapListener":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_i":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"appInitializer"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"ɵangular_packages_router_router_j":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"bootstrapListener"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"ɵangular_packages_router_router_k":{"__symbolic":"function","parameters":[],"value":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_INITIALIZER","line":601,"character":15},"multi":true,"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_i"},"deps":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"}]},{"provide":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_j"},"deps":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER","line":607,"character":14},"multi":true,"useExisting":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"}}]},"ɵangular_packages_router_router_l":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":19,"character":1},"arguments":[{"template":"<router-outlet></router-outlet>"}]}],"members":{}},"Data":{"__symbolic":"interface"},"DeprecatedLoadChildren":{"__symbolic":"interface"},"LoadChildren":{"__symbolic":"interface"},"LoadChildrenCallback":{"__symbolic":"interface"},"QueryParamsHandling":{"__symbolic":"interface"},"ResolveData":{"__symbolic":"interface"},"Route":{"__symbolic":"interface"},"Routes":{"__symbolic":"interface"},"RunGuardsAndResolvers":{"__symbolic":"interface"},"UrlMatcher":{"__symbolic":"interface"},"UrlMatchResult":{"__symbolic":"interface"},"RouterLink":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":117,"character":1},"arguments":[{"selector":":not(a):not(area)[routerLink]"}]}],"members":{"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":125,"character":3}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":132,"character":3}}]}],"queryParamsHandling":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":139,"character":3}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":147,"character":3}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":155,"character":3}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":163,"character":3}}]}],"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":170,"character":3}}]}],"relativeTo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":180,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":190,"character":7},"arguments":["tabindex"]}],null,null],"parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","name":"ActivatedRoute"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":190,"character":57},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":190,"character":72}]}],"ngOnChanges":[{"__symbolic":"method"}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":210,"character":3}}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":220,"character":3},"arguments":["click"]}]}]}},"RouterLinkWithHref":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":255,"character":1},"arguments":[{"selector":"a[routerLink],area[routerLink]"}]}],"members":{"target":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":258,"character":3},"arguments":["attr.target"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":258,"character":31}}]}],"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":265,"character":3}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":272,"character":3}}]}],"queryParamsHandling":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":279,"character":3}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":287,"character":3}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":295,"character":3}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":303,"character":3}}]}],"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":310,"character":3}}]}],"relativeTo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":320,"character":3}}]}],"href":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":329,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","name":"ActivatedRoute"},{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy","line":336,"character":32}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":351,"character":3}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":371,"character":3},"arguments":["click",["$event.button","$event.ctrlKey","$event.shiftKey","$event.altKey","$event.metaKey"]]}]}],"updateTargetUrlAndHref":[{"__symbolic":"method"}]}},"RouterLinkActive":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":78,"character":1},"arguments":[{"selector":"[routerLinkActive]","exportAs":"routerLinkActive"}]}],"members":{"links":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":83,"character":3},"arguments":[{"__symbolic":"reference","name":"RouterLink"},{"descendants":true}]}]}],"linksWithHrefs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":84,"character":3},"arguments":[{"__symbolic":"reference","name":"RouterLinkWithHref"},{"descendants":true}]}]}],"routerLinkActiveOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":99,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":104,"character":48}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":105,"character":7}}]],"parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":103,"character":47},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":103,"character":77},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":104,"character":28},{"__symbolic":"reference","name":"RouterLink"},{"__symbolic":"reference","name":"RouterLinkWithHref"}]}],"ngAfterContentInit":[{"__symbolic":"method"}],"subscribeToEachLinkOnChanges":[{"__symbolic":"method"}],"routerLinkActive":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":135,"character":3}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"isLinkActive":[{"__symbolic":"method"}],"hasActiveLinks":[{"__symbolic":"method"}]}},"RouterOutlet":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":131,"character":1},"arguments":[{"selector":"router-outlet","exportAs":"outlet"}]}],"members":{"activateEvents":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":137,"character":3},"arguments":["activate"]}]}],"deactivateEvents":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":138,"character":3},"arguments":["deactivate"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":142,"character":51},"arguments":["name"]}],null],"parameters":[{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":141,"character":72},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":142,"character":24},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":143,"character":30}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"detach":[{"__symbolic":"method"}],"attach":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"activateWith":[{"__symbolic":"method"}]}},"RouterOutletContract":{"__symbolic":"interface"},"ActivationEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ActivationStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ChildActivationEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ChildActivationStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"Event":{"__symbolic":"interface"},"GuardsCheckEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"},{"__symbolic":"reference","name":"boolean"}]}],"toString":[{"__symbolic":"method"}]}},"GuardsCheckStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationCancel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationError":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"any"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":95,"character":25,"module":"./router"},{"__symbolic":"error","message":"Expression form not supported","line":97,"character":21,"module":"./router"}]}],"toString":[{"__symbolic":"method"}]}},"ResolveEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ResolveStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"RouteConfigLoadEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Route"}]}],"toString":[{"__symbolic":"method"}]}},"RouteConfigLoadStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Route"}]}],"toString":[{"__symbolic":"method"}]}},"RouterEvent":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"}]}]}},"RoutesRecognized":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"Scroll":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"NavigationEnd"},{"__symbolic":"error","message":"Expression form not supported","line":437,"character":25,"module":"./router"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"CanActivate":{"__symbolic":"interface"},"CanActivateChild":{"__symbolic":"interface"},"CanDeactivate":{"__symbolic":"interface"},"CanLoad":{"__symbolic":"interface"},"Resolve":{"__symbolic":"interface"},"BaseRouteReuseStrategy":{"__symbolic":"class","members":{"shouldDetach":[{"__symbolic":"method"}],"store":[{"__symbolic":"method"}],"shouldAttach":[{"__symbolic":"method"}],"retrieve":[{"__symbolic":"method"}],"shouldReuseRoute":[{"__symbolic":"method"}]}},"DetachedRouteHandle":{"__symbolic":"interface"},"RouteReuseStrategy":{"__symbolic":"class","members":{"shouldDetach":[{"__symbolic":"method"}],"store":[{"__symbolic":"method"}],"shouldAttach":[{"__symbolic":"method"}],"retrieve":[{"__symbolic":"method"}],"shouldReuseRoute":[{"__symbolic":"method"}]}},"Navigation":{"__symbolic":"interface"},"NavigationBehaviorOptions":{"__symbolic":"interface"},"NavigationExtras":{"__symbolic":"interface"},"Router":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":397,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"UrlSerializer"},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":592,"character":70},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":592,"character":90},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":593,"character":14},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":593,"character":47},{"__symbolic":"reference","name":"Routes"}]}],"setupNavigations":[{"__symbolic":"method"}],"resetRootComponentType":[{"__symbolic":"method"}],"getTransition":[{"__symbolic":"method"}],"setTransition":[{"__symbolic":"method"}],"initialNavigation":[{"__symbolic":"method"}],"setUpLocationChangeListener":[{"__symbolic":"method"}],"extractLocationChangeInfoFromEvent":[{"__symbolic":"method"}],"shouldScheduleNavigation":[{"__symbolic":"method"}],"getCurrentNavigation":[{"__symbolic":"method"}],"triggerEvent":[{"__symbolic":"method"}],"resetConfig":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"createUrlTree":[{"__symbolic":"method"}],"navigateByUrl":[{"__symbolic":"method"}],"navigate":[{"__symbolic":"method"}],"serializeUrl":[{"__symbolic":"method"}],"parseUrl":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"removeEmptyProps":[{"__symbolic":"method"}],"processNavigations":[{"__symbolic":"method"}],"scheduleNavigation":[{"__symbolic":"method"}],"setBrowserUrl":[{"__symbolic":"method"}],"restoreHistory":[{"__symbolic":"method"}],"resetState":[{"__symbolic":"method"}],"resetUrlToCurrentUrlTree":[{"__symbolic":"method"}],"cancelNavigationTransition":[{"__symbolic":"method"}],"generateNgRouterState":[{"__symbolic":"method"}]}},"UrlCreationOptions":{"__symbolic":"interface"},"ROUTES":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":26,"character":26},"arguments":["ROUTES"]},"ExtraOptions":{"__symbolic":"interface"},"InitialNavigation":{"__symbolic":"interface"},"provideRoutes":{"__symbolic":"function","parameters":["routes"],"value":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"ANALYZE_FOR_ENTRY_COMPONENTS","line":215,"character":14},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}},{"provide":{"__symbolic":"reference","name":"ROUTES"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}}]},"ROUTER_CONFIGURATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":40,"character":40},"arguments":["ROUTER_CONFIGURATION"]},"ROUTER_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":595,"character":8},"arguments":["Router Initializer"]},"RouterModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":93,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"RouterOutlet"},{"__symbolic":"reference","name":"RouterLink"},{"__symbolic":"reference","name":"RouterLinkWithHref"},{"__symbolic":"reference","name":"RouterLinkActive"},{"__symbolic":"reference","name":"ɵangular_packages_router_router_l"}],"exports":[{"__symbolic":"reference","name":"RouterOutlet"},{"__symbolic":"reference","name":"RouterLink"},{"__symbolic":"reference","name":"RouterLinkWithHref"},{"__symbolic":"reference","name":"RouterLinkActive"},{"__symbolic":"reference","name":"ɵangular_packages_router_router_l"}],"entryComponents":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_l"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":100,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":100,"character":27},"arguments":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_a"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":100,"character":69}}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"Router"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["routes","config"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"reference","name":"ɵROUTER_PROVIDERS"},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]},{"provide":{"__symbolic":"reference","name":"ɵangular_packages_router_router_a"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_e"},"deps":[[{"__symbolic":"reference","name":"Router"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":129,"character":30}},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":129,"character":46}}]]},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"config"},"thenExpression":{"__symbolic":"reference","name":"config"},"elseExpression":{}}},{"provide":{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy","line":133,"character":19},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_d"},"deps":[{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation","line":136,"character":15},[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":136,"character":38},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"APP_BASE_HREF","line":136,"character":45}]},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":136,"character":65}}],{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","name":"ɵangular_packages_router_router_o"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_c"},"deps":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/common","name":"ViewportScroller","line":141,"character":25},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","name":"PreloadingStrategy"},"useExisting":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"reference","name":"config"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"}},"thenExpression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"},"elseExpression":{"__symbolic":"reference","name":"NoPreloading"}}},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken","line":148,"character":18},"multi":true,"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_b"}},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"ɵangular_packages_router_router_k"}}]}},"forChild":{"__symbolic":"function","parameters":["routes"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]}]}}}},"ChildrenOutletContexts":{"__symbolic":"class","members":{"onChildOutletCreated":[{"__symbolic":"method"}],"onChildOutletDestroyed":[{"__symbolic":"method"}],"onOutletDeactivated":[{"__symbolic":"method"}],"onOutletReAttached":[{"__symbolic":"method"}],"getOrCreateContext":[{"__symbolic":"method"}],"getContext":[{"__symbolic":"method"}]}},"OutletContext":{"__symbolic":"class","members":{}},"NoPreloading":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"PreloadAllModules":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"PreloadingStrategy":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"RouterPreloader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":73,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":79,"character":44},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":79,"character":77},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":80,"character":24},{"__symbolic":"reference","name":"PreloadingStrategy"}]}],"setUpPreloading":[{"__symbolic":"method"}],"preload":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"processRoutes":[{"__symbolic":"method"}],"preloadConfig":[{"__symbolic":"method"}]}},"ActivatedRoute":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ActivatedRouteSnapshot":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"UrlSegment"}]},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Data"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Route"},{"__symbolic":"reference","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"ResolveData"}]}],"toString":[{"__symbolic":"method"}]}},"RouterState":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_n"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"RouterStateSnapshot":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"ɵangular_packages_router_router_n"}]}],"toString":[{"__symbolic":"method"}]}},"convertToParamMap":{"__symbolic":"function","parameters":["params"],"value":{"__symbolic":"error","message":"Reference to non-exported class","line":68,"character":0,"context":{"className":"ParamsAsMap"},"module":"./router"}},"ParamMap":{"__symbolic":"interface"},"Params":{"__symbolic":"interface"},"PRIMARY_OUTLET":"primary","UrlHandlingStrategy":{"__symbolic":"class","members":{"shouldProcessUrl":[{"__symbolic":"method"}],"extract":[{"__symbolic":"method"}],"merge":[{"__symbolic":"method"}]}},"DefaultUrlSerializer":{"__symbolic":"class","members":{"parse":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}]}},"IsActiveMatchOptions":{"__symbolic":"interface"},"UrlSegment":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":293,"character":25,"module":"./router"}]}],"toString":[{"__symbolic":"method"}]}},"UrlSegmentGroup":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"UrlSegment"}]},{"__symbolic":"error","message":"Expression form not supported","line":236,"character":23,"module":"./router"}]}],"hasChildren":[{"__symbolic":"method"}],"toString":[{"__symbolic":"method"}]}},"UrlSerializer":{"__symbolic":"class","members":{"parse":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}]}},"UrlTree":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version","line":19,"character":27},"arguments":["12.2.13"]},"ɵassignExtraOptionsToRouter":{"__symbolic":"function"},"ɵROUTER_PROVIDERS":[{"__symbolic":"reference","module":"@angular/common","name":"Location","line":48,"character":2},{"provide":{"__symbolic":"reference","name":"UrlSerializer"},"useClass":{"__symbolic":"reference","name":"DefaultUrlSerializer"}},{"provide":{"__symbolic":"reference","name":"Router"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_f"},"deps":[{"__symbolic":"reference","name":"UrlSerializer"},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":54,"character":45},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":54,"character":55},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":54,"character":65},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":54,"character":88},{"__symbolic":"reference","name":"ROUTES"},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},[{"__symbolic":"reference","name":"UrlHandlingStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":55,"character":62}}],[{"__symbolic":"reference","name":"RouteReuseStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":56,"character":31}}]]},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"provide":{"__symbolic":"reference","name":"ActivatedRoute"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_g"},"deps":[{"__symbolic":"reference","name":"Router"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":61,"character":12},"useClass":{"__symbolic":"reference","module":"@angular/core","name":"SystemJsNgModuleLoader","line":61,"character":45}},{"__symbolic":"reference","name":"RouterPreloader"},{"__symbolic":"reference","name":"NoPreloading"},{"__symbolic":"reference","name":"PreloadAllModules"},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"enableTracing":false}}],"ɵflatten":{"__symbolic":"function","parameters":["arr"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"prototype"},"member":"concat"},"member":"apply"},"arguments":[[],{"__symbolic":"reference","name":"arr"}]}},"ɵangular_packages_router_router_m":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_n"}]}],"parent":[{"__symbolic":"method"}],"children":[{"__symbolic":"method"}],"firstChild":[{"__symbolic":"method"}],"siblings":[{"__symbolic":"method"}],"pathFromRoot":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_n":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":92,"character":28,"context":{"typeName":"T"},"module":"./router"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_n"}]}]}],"toString":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_o":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":15,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/common","name":"ViewportScroller","line":29,"character":64},{"__symbolic":"error","message":"Expression form not supported","line":29,"character":99,"module":"./router"}]}],"init":[{"__symbolic":"method"}],"createScrollEvents":[{"__symbolic":"method"}],"consumeScrollEvents":[{"__symbolic":"method"}],"scheduleScrollEvent":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"ɵangular_packages_router_router_a":"./router","ɵangular_packages_router_router_b":"./router","ɵangular_packages_router_router_c":"./router","ɵangular_packages_router_router_d":"./router","ɵangular_packages_router_router_e":"./router","ɵangular_packages_router_router_f":"./router","ɵangular_packages_router_router_g":"./router","ɵangular_packages_router_router_h":"./router","ɵangular_packages_router_router_i":"./router","ɵangular_packages_router_router_j":"./router","ɵangular_packages_router_router_k":"./router","ɵangular_packages_router_router_l":"./router","Data":"./router","DeprecatedLoadChildren":"./router","LoadChildren":"./router","LoadChildrenCallback":"./router","QueryParamsHandling":"./router","ResolveData":"./router","Route":"./router","Routes":"./router","RunGuardsAndResolvers":"./router","UrlMatcher":"./router","UrlMatchResult":"./router","RouterLink":"./router","RouterLinkWithHref":"./router","RouterLinkActive":"./router","RouterOutlet":"./router","RouterOutletContract":"./router","ActivationEnd":"./router","ActivationStart":"./router","ChildActivationEnd":"./router","ChildActivationStart":"./router","Event":"./router","GuardsCheckEnd":"./router","GuardsCheckStart":"./router","NavigationCancel":"./router","NavigationEnd":"./router","NavigationError":"./router","NavigationStart":"./router","ResolveEnd":"./router","ResolveStart":"./router","RouteConfigLoadEnd":"./router","RouteConfigLoadStart":"./router","RouterEvent":"./router","RoutesRecognized":"./router","Scroll":"./router","CanActivate":"./router","CanActivateChild":"./router","CanDeactivate":"./router","CanLoad":"./router","Resolve":"./router","BaseRouteReuseStrategy":"./router","DetachedRouteHandle":"./router","RouteReuseStrategy":"./router","Navigation":"./router","NavigationBehaviorOptions":"./router","NavigationExtras":"./router","Router":"./router","UrlCreationOptions":"./router","ROUTES":"./router","ExtraOptions":"./router","InitialNavigation":"./router","provideRoutes":"./router","ROUTER_CONFIGURATION":"./router","ROUTER_INITIALIZER":"./router","RouterModule":"./router","ChildrenOutletContexts":"./router","OutletContext":"./router","NoPreloading":"./router","PreloadAllModules":"./router","PreloadingStrategy":"./router","RouterPreloader":"./router","ActivatedRoute":"./router","ActivatedRouteSnapshot":"./router","RouterState":"./router","RouterStateSnapshot":"./router","convertToParamMap":"./router","ParamMap":"./router","Params":"./router","PRIMARY_OUTLET":"./router","UrlHandlingStrategy":"./router","DefaultUrlSerializer":"./router","IsActiveMatchOptions":"./router","UrlSegment":"./router","UrlSegmentGroup":"./router","UrlSerializer":"./router","UrlTree":"./router","VERSION":"./router","ɵEmptyOutletComponent":"./router","ɵassignExtraOptionsToRouter":"./router","ɵROUTER_PROVIDERS":"./router","ɵflatten":"./router","ɵangular_packages_router_router_m":"./router","ɵangular_packages_router_router_n":"./router","ɵangular_packages_router_router_o":"./router"},"importAs":"@angular/router"}
Index: trip-planner-front/node_modules/@angular/router/testing.d.ts
===================================================================
--- trip-planner-front/node_modules/@angular/router/testing.d.ts	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/testing.d.ts	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
Index: trip-planner-front/node_modules/@angular/router/testing/testing.d.ts
===================================================================
--- trip-planner-front/node_modules/@angular/router/testing/testing.d.ts	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/testing/testing.d.ts	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
Index: trip-planner-front/node_modules/@angular/router/upgrade.d.ts
===================================================================
--- trip-planner-front/node_modules/@angular/router/upgrade.d.ts	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/upgrade.d.ts	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
Index: trip-planner-front/node_modules/@angular/router/upgrade/upgrade.d.ts
===================================================================
--- trip-planner-front/node_modules/@angular/router/upgrade/upgrade.d.ts	(revision 59329aad30ff25ec5095bb7ffb78ddb59b7dc111)
+++ trip-planner-front/node_modules/@angular/router/upgrade/upgrade.d.ts	(revision 84d0fbb56bfbe319ba63e3327f1777ac5d841f83)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
