{"version":3,"file":"uirouter-angular.mjs","sources":["../../src/statebuilders/views.ts","../../src/mergeInjector.ts","../../src/directives/uiView.ts","../../src/directives/uiSref.ts","../../src/directives/uiSrefStatus.ts","../../src/directives/uiSrefActive.ts","../../src/directives/directives.ts","../../src/injectionTokens.ts","../../src/uiRouterConfig.ts","../../src/lazyLoad/lazyLoadNgModule.ts","../../src/statebuilders/lazyLoad.ts","../../src/location/locationService.ts","../../src/location/locationConfig.ts","../../src/providers.ts","../../src/uiRouterNgModule.ts","../../src/provideUiRouter.ts","../../src/uirouter-angular.ts"],"sourcesContent":["import { isFunction, StateObject } from '@uirouter/core';\r\nimport { PathNode } from '@uirouter/core';\r\nimport { pick, forEach } from '@uirouter/core';\r\nimport { ViewConfig } from '@uirouter/core';\r\nimport { Ng2ViewDeclaration } from '../interface';\r\nimport { services } from '@uirouter/core';\r\nimport { ViewService } from '@uirouter/core';\r\n\r\n/**\r\n * This is a [[StateBuilder.builder]] function for Angular `views`.\r\n *\r\n * When the [[StateBuilder]] builds a [[State]] object from a raw [[StateDeclaration]], this builder\r\n * handles the `views` property with logic specific to @uirouter/angular.\r\n *\r\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object and\r\n * applies the state-level configuration to a view named `$default`.\r\n */\r\nexport function ng2ViewsBuilder(state: StateObject) {\r\n  const views: { [key: string]: Ng2ViewDeclaration } = {},\r\n    viewsObject = state.views || { $default: pick(state, ['component', 'bindings']) };\r\n\r\n  forEach(viewsObject, function (config: Ng2ViewDeclaration, name: string) {\r\n    name = name || '$default'; // Account for views: { \"\": { template... } }\r\n    if (isFunction(config)) config = { component: config as any };\r\n    if (Object.keys(config).length === 0) return;\r\n\r\n    config.$type = 'ng2';\r\n    config.$context = state;\r\n    config.$name = name;\r\n\r\n    const normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\r\n    config.$uiViewName = normalized.uiViewName;\r\n    config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\r\n\r\n    views[name] = config;\r\n  });\r\n  return views;\r\n}\r\n\r\nlet id = 0;\r\nexport class Ng2ViewConfig implements ViewConfig {\r\n  $id: number = id++;\r\n  loaded = true;\r\n\r\n  constructor(public path: PathNode[], public viewDecl: Ng2ViewDeclaration) {}\r\n\r\n  load() {\r\n    return services.$q.when(this);\r\n  }\r\n}\r\n","import { Injector } from '@angular/core';\r\n\r\n/**\r\n * Merge two injectors\r\n *\r\n * This class implements the Injector ng2 interface but delegates\r\n * to the Injectors provided in the constructor.\r\n */\r\nexport class MergeInjector implements Injector {\r\n  static NOT_FOUND = {};\r\n  private injectors: Injector[];\r\n  constructor(...injectors: Injector[]) {\r\n    if (injectors.length < 2) throw new Error('pass at least two injectors');\r\n    this.injectors = injectors;\r\n  }\r\n\r\n  /**\r\n   * Get the token from the first injector which contains it.\r\n   *\r\n   * Delegates to the first Injector.get().\r\n   * If not found, then delegates to the second Injector (and so forth).\r\n   * If no Injector contains the token, return the `notFoundValue`, or throw.\r\n   *\r\n   * @param token the DI token\r\n   * @param notFoundValue the value to return if none of the Injectors contains the token.\r\n   * @returns {any} the DI value\r\n   */\r\n  get(token: any, notFoundValue?: any): any {\r\n    for (let i = 0; i < this.injectors.length; i++) {\r\n      const val = this.injectors[i].get(token, MergeInjector.NOT_FOUND);\r\n      if (val !== MergeInjector.NOT_FOUND) return val;\r\n    }\r\n\r\n    if (arguments.length >= 2) return notFoundValue;\r\n\r\n    // This will throw the DI Injector error\r\n    this.injectors[0].get(token);\r\n  }\r\n}\r\n","import {\r\n  Component,\r\n  ComponentMirror,\r\n  ComponentRef,\r\n  Inject,\r\n  Injector,\r\n  Input,\r\n  OnDestroy,\r\n  OnInit,\r\n  reflectComponentType,\r\n  Type,\r\n  ViewChild,\r\n  ViewContainerRef,\r\n} from '@angular/core';\r\n\r\nimport {\r\n  ActiveUIView,\r\n  filter,\r\n  inArray,\r\n  isFunction,\r\n  NATIVE_INJECTOR_TOKEN,\r\n  Param,\r\n  parse,\r\n  PathNode,\r\n  ResolveContext,\r\n  StateDeclaration,\r\n  trace,\r\n  Transition,\r\n  TransitionHookFn,\r\n  UIRouter,\r\n  unnestR,\r\n  ViewConfig,\r\n  ViewContext,\r\n} from '@uirouter/core';\r\nimport { Ng2ViewConfig } from '../statebuilders/views';\r\nimport { MergeInjector } from '../mergeInjector';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n/** @hidden */\r\nlet id = 0;\r\n\r\n/** @internal These are provide()d as the string UIView.PARENT_INJECT */\r\nexport interface ParentUIViewInject {\r\n  context: ViewContext;\r\n  fqn: string;\r\n}\r\n\r\n/** @internal */\r\ninterface InputMapping {\r\n  token: string;\r\n  prop: string;\r\n}\r\n\r\n/**\r\n * Given a component class, gets the inputs of styles:\r\n *\r\n * - @Input('foo') _foo\r\n * - `inputs: ['foo']`\r\n *\r\n * @internal\r\n */\r\nfunction ng2ComponentInputs<T>(mirror: ComponentMirror<T>): InputMapping[] {\r\n  return mirror.inputs.map((input) => ({ prop: input.templateName, token: input.templateName }));\r\n};\r\n\r\n/**\r\n * A UI-Router viewport directive, which is filled in by a view (component) on a state.\r\n *\r\n * ### Selector\r\n *\r\n * A `ui-view` directive can be created as an element: `<ui-view></ui-view>` or as an attribute: `<div ui-view></div>`.\r\n *\r\n * ### Purpose\r\n *\r\n * This directive is used in a Component template (or as the root component) to create a viewport.  The viewport\r\n * is filled in by a view (as defined by a [[Ng2ViewDeclaration]] inside a [[Ng2StateDeclaration]]) when the view's\r\n * state has been activated.\r\n *\r\n * #### Example:\r\n * ```js\r\n * // This app has two states, 'foo' and 'bar'\r\n * stateRegistry.register({ name: 'foo', url: '/foo', component: FooComponent });\r\n * stateRegistry.register({ name: 'bar', url: '/bar', component: BarComponent });\r\n * ```\r\n * ```html\r\n * <!-- This ui-view will be filled in by the foo state's component or\r\n *      the bar state's component when the foo or bar state is activated -->\r\n * <ui-view></ui-view>\r\n * ```\r\n *\r\n * ### Named ui-views\r\n *\r\n * A `ui-view` may optionally be given a name via the attribute value: `<div ui-view='header'></div>`.  *Note:\r\n * an unnamed `ui-view` is internally named `$default`*.   When a `ui-view` has a name, it will be filled in\r\n * by a matching named view.\r\n *\r\n * #### Example:\r\n * ```js\r\n * stateRegistry.register({\r\n *   name: 'foo',\r\n *   url: '/foo',\r\n *   views: { header: HeaderComponent, $default: FooComponent });\r\n * ```\r\n * ```html\r\n * <!-- When 'foo' state is active, filled by HeaderComponent -->\r\n * <div ui-view=\"header\"></div>\r\n *\r\n * <!-- When 'foo' state is active, filled by FooComponent -->\r\n * <ui-view></ui-view>\r\n * ```\r\n */\r\n@Component({\r\n  selector: 'ui-view, [ui-view]',\r\n  exportAs: 'uiView',\r\n  standalone: true,\r\n  imports: [CommonModule],\r\n  template: `\r\n    <ng-template #componentTarget></ng-template>\r\n    <ng-content *ngIf=\"!_componentRef\"></ng-content>\r\n  `,\r\n})\r\nexport class UIView implements OnInit, OnDestroy {\r\n  static PARENT_INJECT = 'UIView.PARENT_INJECT';\r\n\r\n  @ViewChild('componentTarget', { read: ViewContainerRef, static: true })\r\n  _componentTarget: ViewContainerRef;\r\n  @Input('name') name: string;\r\n\r\n  @Input('ui-view')\r\n  set _name(val: string) {\r\n    this.name = val;\r\n  }\r\n\r\n  /** The reference to the component currently inside the viewport */\r\n  _componentRef: ComponentRef<any>;\r\n  /** Deregisters the ui-view from the view service */\r\n  private _deregisterUIView: Function;\r\n  /** Deregisters the master uiCanExit transition hook */\r\n  private _deregisterUiCanExitHook: Function;\r\n  /** Deregisters the master uiOnParamsChanged transition hook */\r\n  private _deregisterUiOnParamsChangedHook: Function;\r\n  /** Data about the this UIView */\r\n  private _uiViewData: ActiveUIView = <any>{};\r\n  private _parent: ParentUIViewInject;\r\n\r\n  constructor(\r\n    public router: UIRouter,\r\n    @Inject(UIView.PARENT_INJECT) parent,\r\n    public viewContainerRef: ViewContainerRef\r\n  ) {\r\n    this._parent = parent;\r\n  }\r\n\r\n  /**\r\n   * @returns the UI-Router `state` that is filling this uiView, or `undefined`.\r\n   */\r\n  public get state(): StateDeclaration {\r\n    return parse('_uiViewData.config.viewDecl.$context.self')(this);\r\n  }\r\n\r\n  ngOnInit() {\r\n    const router = this.router;\r\n    const parentFqn = this._parent.fqn;\r\n    const name = this.name || '$default';\r\n\r\n    this._uiViewData = {\r\n      $type: 'ng2',\r\n      id: id++,\r\n      name: name,\r\n      fqn: parentFqn ? parentFqn + '.' + name : name,\r\n      creationContext: this._parent.context,\r\n      configUpdated: this._viewConfigUpdated.bind(this),\r\n      config: undefined,\r\n    };\r\n\r\n    this._deregisterUiCanExitHook = router.transitionService.onBefore({}, (trans) => {\r\n      return this._invokeUiCanExitHook(trans);\r\n    });\r\n\r\n    this._deregisterUiOnParamsChangedHook = router.transitionService.onSuccess({}, (trans) =>\r\n      this._invokeUiOnParamsChangedHook(trans)\r\n    );\r\n\r\n    this._deregisterUIView = router.viewService.registerUIView(this._uiViewData);\r\n  }\r\n\r\n  /**\r\n   * For each transition, checks the component loaded in the ui-view for:\r\n   *\r\n   * - has a uiCanExit() component hook\r\n   * - is being exited\r\n   *\r\n   * If both are true, adds the uiCanExit component function as a hook to that singular Transition.\r\n   */\r\n  private _invokeUiCanExitHook(trans: Transition) {\r\n    const instance = this._componentRef && this._componentRef.instance;\r\n    const uiCanExitFn: TransitionHookFn = instance && instance.uiCanExit;\r\n\r\n    if (isFunction(uiCanExitFn)) {\r\n      const state: StateDeclaration = this.state;\r\n\r\n      if (trans.exiting().indexOf(state) !== -1) {\r\n        trans.onStart({}, function () {\r\n          return uiCanExitFn.call(instance, trans);\r\n        });\r\n      }\r\n    }\r\n  }\r\n\r\n  /**\r\n   * For each transition, checks if any param values changed and notify component\r\n   */\r\n  private _invokeUiOnParamsChangedHook($transition$: Transition) {\r\n    const instance = this._componentRef && this._componentRef.instance;\r\n    const uiOnParamsChanged: TransitionHookFn = instance && instance.uiOnParamsChanged;\r\n\r\n    if (isFunction(uiOnParamsChanged)) {\r\n      const viewState: StateDeclaration = this.state;\r\n      const resolveContext: ResolveContext = new ResolveContext(this._uiViewData.config.path);\r\n      const viewCreationTrans = resolveContext.getResolvable('$transition$').data;\r\n\r\n      // Exit early if the $transition$ is the same as the view was created within.\r\n      // Exit early if the $transition$ will exit the state the view is for.\r\n      if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1)\r\n        return;\r\n\r\n      const toParams: { [paramName: string]: any } = $transition$.params('to');\r\n      const fromParams: { [paramName: string]: any } = $transition$.params('from');\r\n      const getNodeSchema = (node: PathNode) => node.paramSchema;\r\n      const toSchema: Param[] = $transition$.treeChanges('to').map(getNodeSchema).reduce(unnestR, []);\r\n      const fromSchema: Param[] = $transition$.treeChanges('from').map(getNodeSchema).reduce(unnestR, []);\r\n\r\n      // Find the to params that have different values than the from params\r\n      const changedToParams = toSchema.filter((param: Param) => {\r\n        const idx = fromSchema.indexOf(param);\r\n        return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\r\n      });\r\n\r\n      // Only trigger callback if a to param has changed or is new\r\n      if (changedToParams.length) {\r\n        const changedKeys: string[] = changedToParams.map((x) => x.id);\r\n        // Filter the params to only changed/new to params.  `$transition$.params()` may be used to get all params.\r\n        const newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\r\n        instance.uiOnParamsChanged(newValues, $transition$);\r\n      }\r\n    }\r\n  }\r\n\r\n  private _disposeLast() {\r\n    if (this._componentRef) this._componentRef.destroy();\r\n    this._componentRef = null;\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    if (this._deregisterUIView) this._deregisterUIView();\r\n    if (this._deregisterUiCanExitHook) this._deregisterUiCanExitHook();\r\n    if (this._deregisterUiOnParamsChangedHook) this._deregisterUiOnParamsChangedHook();\r\n    this._deregisterUIView = this._deregisterUiCanExitHook = this._deregisterUiOnParamsChangedHook = null;\r\n    this._disposeLast();\r\n  }\r\n\r\n  /**\r\n   * The view service is informing us of an updated ViewConfig\r\n   * (usually because a transition activated some state and its views)\r\n   */\r\n  _viewConfigUpdated(config: ViewConfig) {\r\n    // The config may be undefined if there is nothing currently targeting this UIView.\r\n    // Dispose the current component, if there is one\r\n    if (!config) return this._disposeLast();\r\n\r\n    // Only care about Ng2 configs\r\n    if (!(config instanceof Ng2ViewConfig)) return;\r\n\r\n    // The \"new\" viewconfig is already applied, so exit early\r\n    if (this._uiViewData.config === config) return;\r\n\r\n    // This is a new ViewConfig.  Dispose the previous component\r\n    this._disposeLast();\r\n    trace.traceUIViewConfigUpdated(this._uiViewData, config && config.viewDecl.$context);\r\n\r\n    this._applyUpdatedConfig(config);\r\n\r\n    // Initiate change detection for the newly created component\r\n    this._componentRef.changeDetectorRef.markForCheck();\r\n  }\r\n\r\n  private _applyUpdatedConfig(config: Ng2ViewConfig) {\r\n    this._uiViewData.config = config;\r\n    // Create the Injector for the routed component\r\n    const context = new ResolveContext(config.path);\r\n    const componentInjector = this._getComponentInjector(context);\r\n\r\n    // Get the component class from the view declaration. TODO: allow promises?\r\n    const componentClass = config.viewDecl.component;\r\n\r\n    // Create the component\r\n    this._componentRef = this._componentTarget.createComponent(componentClass, { injector: componentInjector });\r\n    // Wire resolves to @Input()s\r\n    this._applyInputBindings(componentClass, this._componentRef, context);\r\n  }\r\n\r\n  /**\r\n   * Creates a new Injector for a routed component.\r\n   *\r\n   * Adds resolve values to the Injector\r\n   * Adds providers from the NgModule for the state\r\n   * Adds providers from the parent Component in the component tree\r\n   * Adds a PARENT_INJECT view context object\r\n   *\r\n   * @returns an Injector\r\n   */\r\n  private _getComponentInjector(context: ResolveContext): Injector {\r\n    // Map resolves to \"useValue: providers\"\r\n    const resolvables = context\r\n      .getTokens()\r\n      .map((token) => context.getResolvable(token))\r\n      .filter((r) => r.resolved);\r\n\r\n    const newProviders = resolvables.map((r) => ({ provide: r.token, useValue: context.injector().get(r.token) }));\r\n\r\n    const parentInject = { context: this._uiViewData.config.viewDecl.$context, fqn: this._uiViewData.fqn };\r\n    newProviders.push({ provide: UIView.PARENT_INJECT, useValue: parentInject });\r\n\r\n    const parentComponentInjector = this.viewContainerRef.injector;\r\n    const moduleInjector = context.getResolvable(NATIVE_INJECTOR_TOKEN).data;\r\n    const mergedParentInjector = new MergeInjector(moduleInjector, parentComponentInjector);\r\n\r\n    return Injector.create({ providers: newProviders, parent: mergedParentInjector });\r\n  }\r\n\r\n  /**\r\n   * Supplies component inputs with resolve data\r\n   *\r\n   * Finds component inputs which match resolves (by name) and sets the input value\r\n   * to the resolve data.\r\n   */\r\n  private _applyInputBindings<T>(component: Type<T>, componentRef: ComponentRef<T>, context: ResolveContext): void {\r\n    const bindings = this._uiViewData.config.viewDecl['bindings'] || {};\r\n    const explicitBoundProps = Object.keys(bindings);\r\n    const mirror = reflectComponentType(component);\r\n\r\n    // Supply resolve data to component as specified in the state's `bindings: {}`\r\n    const explicitInputTuples = explicitBoundProps.reduce(\r\n      (acc, key) => acc.concat([{ prop: key, token: bindings[key] }]),\r\n      []\r\n    );\r\n\r\n    // Supply resolve data to matching @Input('prop') or inputs: ['prop']\r\n    const implicitInputTuples = ng2ComponentInputs(mirror).filter((tuple) => !inArray(explicitBoundProps, tuple.prop));\r\n\r\n    const addResolvable = (tuple: InputMapping) => ({\r\n      prop: tuple.prop,\r\n      resolvable: context.getResolvable(tuple.token),\r\n    });\r\n\r\n    const injector = context.injector();\r\n\r\n    explicitInputTuples\r\n      .concat(implicitInputTuples)\r\n      .map(addResolvable)\r\n      .filter((tuple) => tuple.resolvable && tuple.resolvable.resolved)\r\n      .forEach((tuple) => {\r\n        componentRef.setInput(tuple.prop, injector.get(tuple.resolvable.token));\r\n      });\r\n  }\r\n}\r\n","import { UIRouter, extend, Obj, StateOrName, TransitionOptions, TargetState, isNumber, isNullOrUndefined } from '@uirouter/core';\r\nimport {\r\n  Directive,\r\n  Inject,\r\n  Input,\r\n  Optional,\r\n  ElementRef,\r\n  Renderer2,\r\n  OnChanges,\r\n  SimpleChanges,\r\n  HostListener,\r\n} from '@angular/core';\r\nimport { UIView, ParentUIViewInject } from './uiView';\r\nimport { ReplaySubject, Subscription } from 'rxjs';\r\n\r\n/**\r\n * @internal\r\n * # blah blah blah\r\n */\r\n@Directive({\r\n  selector: 'a[uiSref]',\r\n  standalone: true\r\n})\r\nexport class AnchorUISref {\r\n  constructor(public _el: ElementRef, public _renderer: Renderer2) {}\r\n\r\n  openInNewTab() {\r\n    return this._el.nativeElement.target === '_blank';\r\n  }\r\n\r\n  update(href: string) {\r\n    if (!isNullOrUndefined(href)) {\r\n      this._renderer.setProperty(this._el.nativeElement, 'href', href);\r\n    } else {\r\n      this._renderer.removeAttribute(this._el.nativeElement, 'href');\r\n    }\r\n  }\r\n}\r\n\r\n/**\r\n * A directive when clicked, initiates a [[Transition]] to a [[TargetState]].\r\n *\r\n * ### Purpose\r\n *\r\n * This directive is applied to anchor tags (`<a>`) or any other clickable element.  It is a state reference (or sref --\r\n * similar to an href).  When clicked, the directive will transition to that state by calling [[StateService.go]],\r\n * and optionally supply state parameter values and transition options.\r\n *\r\n * When this directive is on an anchor tag, it will also add an `href` attribute to the anchor.\r\n *\r\n * ### Selector\r\n *\r\n * - `[uiSref]`: The directive is created as an attribute on an element, e.g., `<a uiSref></a>`\r\n *\r\n * ### Inputs\r\n *\r\n * - `uiSref`: the target state's name, e.g., `uiSref=\"foostate\"`.  If a component template uses a relative `uiSref`,\r\n * e.g., `uiSref=\".child\"`, the reference is relative to that component's state.\r\n *\r\n * - `uiParams`: any target state parameter values, as an object, e.g., `[uiParams]=\"{ fooId: bar.fooId }\"`\r\n *\r\n * - `uiOptions`: [[TransitionOptions]], e.g., `[uiOptions]=\"{ inherit: false }\"`\r\n *\r\n * @example\r\n * ```html\r\n *\r\n * <!-- Targets bar state' -->\r\n * <a uiSref=\"bar\">Bar</a>\r\n *\r\n * <!-- Assume this component's state is \"foo\".\r\n *      Relatively targets \"foo.child\" -->\r\n * <a uiSref=\".child\">Foo Child</a>\r\n *\r\n * <!-- Targets \"bar\" state and supplies parameter value -->\r\n * <a uiSref=\"bar\" [uiParams]=\"{ barId: foo.barId }\">Bar {{foo.barId}}</a>\r\n *\r\n * <!-- Targets \"bar\" state and parameter, doesn't inherit existing parameters-->\r\n * <a uiSref=\"bar\" [uiParams]=\"{ barId: foo.barId }\" [uiOptions]=\"{ inherit: false }\">Bar {{foo.barId}}</a>\r\n * ```\r\n */\r\n@Directive({\r\n  selector: '[uiSref]',\r\n  exportAs: 'uiSref',\r\n  standalone: true\r\n})\r\nexport class UISref implements OnChanges {\r\n  /**\r\n   * `@Input('uiSref')` The name of the state to link to\r\n   *\r\n   * ```html\r\n   * <a uiSref=\"hoome\">Home</a>\r\n   * ```\r\n   */\r\n  @Input('uiSref') state: StateOrName;\r\n\r\n  /**\r\n   * `@Input('uiParams')` The parameter values to use (as key/values)\r\n   *\r\n   * ```html\r\n   * <a uiSref=\"book\" [uiParams]=\"{ bookId: book.id }\">Book {{ book.name }}</a>\r\n   * ```\r\n   */\r\n  @Input('uiParams') params: any;\r\n\r\n  /**\r\n   * `@Input('uiOptions')` The transition options\r\n   *\r\n   * ```html\r\n   * <a uiSref=\"books\" [uiOptions]=\"{ reload: true }\">Book {{ book.name }}</a>\r\n   * ```\r\n   */\r\n  @Input('uiOptions') options: TransitionOptions;\r\n\r\n  /**\r\n   * An observable (ReplaySubject) of the state this UISref is targeting.\r\n   * When the UISref is clicked, it will transition to this [[TargetState]].\r\n   */\r\n  public targetState$ = new ReplaySubject<TargetState>(1);\r\n\r\n  /** @internal */ private _emit = false;\r\n  /** @internal */ private _statesSub: Subscription;\r\n  /** @internal */ private _router: UIRouter;\r\n  /** @internal */ private _anchorUISref: AnchorUISref;\r\n  /** @internal */ private _parent: ParentUIViewInject;\r\n\r\n  constructor(\r\n    _router: UIRouter,\r\n    @Optional() _anchorUISref: AnchorUISref,\r\n    @Inject(UIView.PARENT_INJECT) parent: ParentUIViewInject\r\n  ) {\r\n    this._router = _router;\r\n    this._anchorUISref = _anchorUISref;\r\n    this._parent = parent;\r\n\r\n    this._statesSub = _router.globals.states$.subscribe(() => this.update());\r\n  }\r\n\r\n  /** @internal */\r\n  set uiSref(val: StateOrName) {\r\n    this.state = val;\r\n    this.update();\r\n  }\r\n  /** @internal */\r\n  set uiParams(val: Obj) {\r\n    this.params = val;\r\n    this.update();\r\n  }\r\n  /** @internal */\r\n  set uiOptions(val: TransitionOptions) {\r\n    this.options = val;\r\n    this.update();\r\n  }\r\n\r\n  ngOnInit() {\r\n    this._emit = true;\r\n    this.update();\r\n  }\r\n\r\n  ngOnChanges(changes: SimpleChanges): void {\r\n    this.update();\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    this._emit = false;\r\n    this._statesSub.unsubscribe();\r\n    this.targetState$.unsubscribe();\r\n  }\r\n\r\n  private update() {\r\n    const $state = this._router.stateService;\r\n    if (this._emit) {\r\n      const newTarget = $state.target(this.state, this.params, this.getOptions());\r\n      this.targetState$.next(newTarget);\r\n    }\r\n\r\n    if (this._anchorUISref) {\r\n      if (!this.state) {\r\n        this._anchorUISref.update(null);\r\n      } else {\r\n        const href = $state.href(this.state, this.params, this.getOptions()) || '';\r\n        this._anchorUISref.update(href);\r\n      }\r\n    }\r\n  }\r\n\r\n  getOptions() {\r\n    const defaultOpts: TransitionOptions = {\r\n      relative: this._parent && this._parent.context && this._parent.context.name,\r\n      inherit: true,\r\n      source: 'sref',\r\n    };\r\n    return extend(defaultOpts, this.options || {});\r\n  }\r\n\r\n  /** When triggered by a (click) event, this function transitions to the UISref's target state */\r\n  @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey'])\r\n  go(button: number, ctrlKey: boolean, metaKey: boolean) {\r\n    if (\r\n      (this._anchorUISref &&\r\n        (this._anchorUISref.openInNewTab() || button || !isNumber(button) || ctrlKey || metaKey)) ||\r\n      !this.state\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    this._router.stateService.go(this.state, this.params, this.getOptions());\r\n    return false;\r\n  }\r\n}\r\n","import { Directive, Output, EventEmitter, ContentChildren, QueryList, Host, Self, Optional } from '@angular/core';\r\nimport { UISref } from './uiSref';\r\nimport {\r\n  PathNode,\r\n  Transition,\r\n  TargetState,\r\n  StateObject,\r\n  anyTrueR,\r\n  tail,\r\n  unnestR,\r\n  Predicate,\r\n  UIRouterGlobals,\r\n  Param,\r\n  PathUtils,\r\n  identity,\r\n  uniqR,\r\n} from '@uirouter/core';\r\n\r\nimport { Subscription, Observable, BehaviorSubject, of, from, combineLatest, concat } from 'rxjs';\r\nimport { switchMap, map, tap } from 'rxjs/operators';\r\n\r\n/** @internal */\r\ninterface TransEvt {\r\n  evt: string;\r\n  trans: Transition;\r\n}\r\n\r\n/**\r\n * UISref status emitted from [[UISrefStatus]]\r\n */\r\nexport interface SrefStatus {\r\n  /** The sref's target state (or one of its children) is currently active */\r\n  active: boolean;\r\n  /** The sref's target state is currently active */\r\n  exact: boolean;\r\n  /** A transition is entering the sref's target state */\r\n  entering: boolean;\r\n  /** A transition is exiting the sref's target state */\r\n  exiting: boolean;\r\n  /** The enclosed sref(s) target state(s) */\r\n  targetStates: TargetState[];\r\n}\r\n\r\n/** @internal */\r\nconst inactiveStatus: SrefStatus = {\r\n  active: false,\r\n  exact: false,\r\n  entering: false,\r\n  exiting: false,\r\n  targetStates: [],\r\n};\r\n\r\n/**\r\n * Returns a Predicate<PathNode[]>\r\n *\r\n * The predicate returns true when the target state (and param values)\r\n * match the (tail of) the path, and the path's param values\r\n *\r\n * @internal\r\n */\r\nconst pathMatches = (target: TargetState): Predicate<PathNode[]> => {\r\n  if (!target.exists()) return () => false;\r\n  const state: StateObject = target.$state();\r\n  const targetParamVals = target.params();\r\n  const targetPath: PathNode[] = PathUtils.buildPath(target);\r\n  const paramSchema: Param[] = targetPath\r\n    .map((node) => node.paramSchema)\r\n    .reduce(unnestR, [])\r\n    .filter((param: Param) => targetParamVals.hasOwnProperty(param.id));\r\n\r\n  return (path: PathNode[]) => {\r\n    const tailNode = tail(path);\r\n    if (!tailNode || tailNode.state !== state) return false;\r\n    const paramValues = PathUtils.paramValues(path);\r\n    return Param.equals(paramSchema, paramValues, targetParamVals);\r\n  };\r\n};\r\n\r\n/**\r\n * Given basePath: [a, b], appendPath: [c, d]),\r\n * Expands the path to [c], [c, d]\r\n * Then appends each to [a,b,] and returns: [a, b, c], [a, b, c, d]\r\n *\r\n * @internal\r\n */\r\nfunction spreadToSubPaths(basePath: PathNode[], appendPath: PathNode[]): PathNode[][] {\r\n  return appendPath.map((node) => basePath.concat(PathUtils.subPath(appendPath, (n) => n.state === node.state)));\r\n}\r\n\r\n/**\r\n * Given a TransEvt (Transition event: started, success, error)\r\n * and a UISref Target State, return a SrefStatus object\r\n * which represents the current status of that Sref:\r\n * active, activeEq (exact match), entering, exiting\r\n *\r\n * @internal\r\n */\r\nfunction getSrefStatus(event: TransEvt, srefTarget: TargetState): SrefStatus {\r\n  const pathMatchesTarget = pathMatches(srefTarget);\r\n  const tc = event.trans.treeChanges();\r\n\r\n  const isStartEvent = event.evt === 'start';\r\n  const isSuccessEvent = event.evt === 'success';\r\n  const activePath: PathNode[] = isSuccessEvent ? tc.to : tc.from;\r\n\r\n  const isActive = () => spreadToSubPaths([], activePath).map(pathMatchesTarget).reduce(anyTrueR, false);\r\n\r\n  const isExact = () => pathMatchesTarget(activePath);\r\n\r\n  const isEntering = () => spreadToSubPaths(tc.retained, tc.entering).map(pathMatchesTarget).reduce(anyTrueR, false);\r\n\r\n  const isExiting = () => spreadToSubPaths(tc.retained, tc.exiting).map(pathMatchesTarget).reduce(anyTrueR, false);\r\n\r\n  return {\r\n    active: isActive(),\r\n    exact: isExact(),\r\n    entering: isStartEvent ? isEntering() : false,\r\n    exiting: isStartEvent ? isExiting() : false,\r\n    targetStates: [srefTarget],\r\n  } as SrefStatus;\r\n}\r\n\r\n/** @internal */\r\nfunction mergeSrefStatus(left: SrefStatus, right: SrefStatus): SrefStatus {\r\n  return {\r\n    active: left.active || right.active,\r\n    exact: left.exact || right.exact,\r\n    entering: left.entering || right.entering,\r\n    exiting: left.exiting || right.exiting,\r\n    targetStates: left.targetStates.concat(right.targetStates),\r\n  };\r\n}\r\n\r\n/**\r\n * A directive which emits events when a paired [[UISref]] status changes.\r\n *\r\n * This directive is primarily used by the [[UISrefActive]] directives to monitor `UISref`(s).\r\n *\r\n * This directive shares two attribute selectors with `UISrefActive`:\r\n *\r\n * - `[uiSrefActive]`\r\n * - `[uiSrefActiveEq]`.\r\n *\r\n * Thus, whenever a `UISrefActive` directive is created, a `UISrefStatus` directive is also created.\r\n *\r\n * Most apps should simply use `UISrefActive`, but some advanced components may want to process the\r\n * [[SrefStatus]] events directly.\r\n *\r\n * ```js\r\n * <li (uiSrefStatus)=\"onSrefStatusChanged($event)\">\r\n *   <a uiSref=\"book\" [uiParams]=\"{ bookId: book.id }\">Book {{ book.name }}</a>\r\n * </li>\r\n * ```\r\n *\r\n * The `uiSrefStatus` event is emitted whenever an enclosed `uiSref`'s status changes.\r\n * The event emitted is of type [[SrefStatus]], and has boolean values for `active`, `exact`, `entering`, and `exiting`; also has a [[StateOrName]] `identifier`value.\r\n *\r\n * The values from this event can be captured and stored on a component (then applied, e.g., using ngClass).\r\n *\r\n * ---\r\n *\r\n * A single `uiSrefStatus` can enclose multiple `uiSref`.\r\n * Each status boolean (`active`, `exact`, `entering`, `exiting`) will be true if *any of the enclosed `uiSref` status is true*.\r\n * In other words, all enclosed `uiSref` statuses  are merged to a single status using `||` (logical or).\r\n *\r\n * ```js\r\n * <li (uiSrefStatus)=\"onSrefStatus($event)\" uiSref=\"admin\">\r\n *   Home\r\n *   <ul>\r\n *     <li> <a uiSref=\"admin.users\">Users</a> </li>\r\n *     <li> <a uiSref=\"admin.groups\">Groups</a> </li>\r\n *   </ul>\r\n * </li>\r\n * ```\r\n *\r\n * In the above example, `$event.active === true` when either `admin.users` or `admin.groups` is active.\r\n *\r\n * ---\r\n *\r\n * This API is subject to change.\r\n */\r\n@Directive({\r\n  selector: '[uiSrefStatus]',\r\n  exportAs: 'uiSrefStatus',\r\n  standalone: true\r\n})\r\nexport class UISrefStatus {\r\n  /** current statuses of the state/params the uiSref directive is linking to */\r\n  @Output('uiSrefStatus') uiSrefStatus = new EventEmitter<SrefStatus>(false);\r\n  /** Monitor all child components for UISref(s) */\r\n  @ContentChildren(UISref, { descendants: true })\r\n  private _srefs: QueryList<UISref>;\r\n\r\n  /** The current status */\r\n  status: SrefStatus;\r\n\r\n  /** @internal */ private _subscription: Subscription;\r\n  /** @internal */ private _srefChangesSub: Subscription;\r\n  /** @internal */ private _srefs$: BehaviorSubject<UISref[]>;\r\n  /** @internal */ private _globals: UIRouterGlobals;\r\n  /** @internal */ private _hostUiSref: UISref;\r\n  constructor(@Host() @Self() @Optional() _hostUiSref: UISref, _globals: UIRouterGlobals) {\r\n    this._globals = _globals;\r\n    this._hostUiSref = _hostUiSref;\r\n    this.status = Object.assign({}, inactiveStatus);\r\n  }\r\n\r\n  ngAfterContentInit() {\r\n    // Map each transition start event to a stream of:\r\n    // start -> (success|error)\r\n    const transEvents$: Observable<TransEvt> = this._globals.start$.pipe(\r\n      switchMap((trans: Transition) => {\r\n        const event = (evt: string) => ({ evt, trans } as TransEvt);\r\n\r\n        const transStart$ = of(event('start'));\r\n        const transResult = trans.promise.then(\r\n          () => event('success'),\r\n          () => event('error')\r\n        );\r\n        const transFinish$ = from(transResult);\r\n\r\n        return concat(transStart$, transFinish$);\r\n      })\r\n    );\r\n\r\n    const withHostSref = (childrenSrefs: UISref[]) =>\r\n      childrenSrefs.concat(this._hostUiSref).filter(identity).reduce(uniqR, []);\r\n\r\n    // Watch the @ContentChildren UISref[] components and get their target states\r\n    this._srefs$ = new BehaviorSubject(withHostSref(this._srefs.toArray()));\r\n    this._srefChangesSub = this._srefs.changes.subscribe((srefs: QueryList<UISref>) =>\r\n      this._srefs$.next(withHostSref(srefs.toArray()))\r\n    );\r\n\r\n    const targetStates$: Observable<TargetState[]> = this._srefs$.pipe(\r\n      switchMap((srefs: UISref[]) => combineLatest<TargetState[]>(srefs.map((sref) => sref.targetState$)))\r\n    );\r\n\r\n    // Calculate the status of each UISref based on the transition event.\r\n    // Reduce the statuses (if multiple) by or-ing each flag.\r\n    this._subscription = transEvents$\r\n      .pipe(\r\n        switchMap((evt: TransEvt) => {\r\n          return targetStates$.pipe(\r\n            map((targets: TargetState[]) => {\r\n              const statuses: SrefStatus[] = targets.map((target) => getSrefStatus(evt, target));\r\n              return statuses.reduce(mergeSrefStatus);\r\n            })\r\n          );\r\n        })\r\n      )\r\n      .subscribe(this._setStatus.bind(this));\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    if (this._subscription) this._subscription.unsubscribe();\r\n    if (this._srefChangesSub) this._srefChangesSub.unsubscribe();\r\n    if (this._srefs$) this._srefs$.unsubscribe();\r\n    this._subscription = this._srefChangesSub = this._srefs$ = undefined;\r\n  }\r\n\r\n  private _setStatus(status: SrefStatus) {\r\n    this.status = status;\r\n    this.uiSrefStatus.emit(status);\r\n  }\r\n}\r\n","import { Directive, Input, ElementRef, Host, Renderer2 } from '@angular/core';\r\nimport { UISrefStatus, SrefStatus } from './uiSrefStatus';\r\nimport { Subscription } from 'rxjs';\r\n\r\n/**\r\n * A directive that adds a CSS class when its associated `uiSref` link is active.\r\n *\r\n * ### Purpose\r\n *\r\n * This directive should be paired with one (or more) [[UISref]] directives.\r\n * It will apply a CSS class to its element when the state the `uiSref` targets is activated.\r\n *\r\n * This can be used to create navigation UI where the active link is highlighted.\r\n *\r\n * ### Selectors\r\n *\r\n * - `[uiSrefActive]`: When this selector is used, the class is added when the target state or any\r\n * child of the target state is active\r\n * - `[uiSrefActiveEq]`: When this selector is used, the class is added when the target state is\r\n * exactly active (the class is not added if a child of the target state is active).\r\n *\r\n * ### Inputs\r\n *\r\n * - `uiSrefActive`/`uiSrefActiveEq`: one or more CSS classes to add to the element, when the `uiSref` is active\r\n *\r\n * #### Example:\r\n * The anchor tag has the `active` class added when the `foo` state is active.\r\n * ```html\r\n * <a uiSref=\"foo\" uiSrefActive=\"active\">Foo</a>\r\n * ```\r\n *\r\n * ### Matching parameters\r\n *\r\n * If the `uiSref` includes parameters, the current state must be active, *and* the parameter values must match.\r\n *\r\n * #### Example:\r\n * The first anchor tag has the `active` class added when the `foo.bar` state is active and the `id` parameter\r\n * equals 25.\r\n * The second anchor tag has the `active` class added when the `foo.bar` state is active and the `id` parameter\r\n * equals 32.\r\n * ```html\r\n * <a uiSref=\"foo.bar\" [uiParams]=\"{ id: 25 }\" uiSrefActive=\"active\">Bar #25</a>\r\n * <a uiSref=\"foo.bar\" [uiParams]=\"{ id: 32 }\" uiSrefActive=\"active\">Bar #32</a>\r\n * ```\r\n *\r\n * #### Example:\r\n * A list of anchor tags are created for a list of `bar` objects.\r\n * An anchor tag will have the `active` class when `foo.bar` state is active and the `id` parameter matches\r\n * that object's `id`.\r\n * ```html\r\n * <li *ngFor=\"let bar of bars\">\r\n *   <a uiSref=\"foo.bar\" [uiParams]=\"{ id: bar.id }\" uiSrefActive=\"active\">Bar #{{ bar.id }}</a>\r\n * </li>\r\n * ```\r\n *\r\n * ### Multiple uiSrefs\r\n *\r\n * A single `uiSrefActive` can be used for multiple `uiSref` links.\r\n * This can be used to create (for example) a drop down navigation menu, where the menui is highlighted\r\n * if *any* of its inner links are active.\r\n *\r\n * The `uiSrefActive` should be placed on an ancestor element of the `uiSref` list.\r\n * If anyof the `uiSref` links are activated, the class will be added to the ancestor element.\r\n *\r\n * #### Example:\r\n * This is a dropdown nagivation menu for \"Admin\" states.\r\n * When any of `admin.users`, `admin.groups`, `admin.settings` are active, the `<li>` for the dropdown\r\n * has the `dropdown-child-active` class applied.\r\n * Additionally, the active anchor tag has the `active` class applied.\r\n * ```html\r\n * <ul class=\"dropdown-menu\">\r\n *   <li uiSrefActive=\"dropdown-child-active\" class=\"dropdown admin\">\r\n *     Admin\r\n *     <ul>\r\n *       <li><a uiSref=\"admin.users\" uiSrefActive=\"active\">Users</a></li>\r\n *       <li><a uiSref=\"admin.groups\" uiSrefActive=\"active\">Groups</a></li>\r\n *       <li><a uiSref=\"admin.settings\" uiSrefActive=\"active\">Settings</a></li>\r\n *     </ul>\r\n *   </li>\r\n * </ul>\r\n * ```\r\n */\r\n@Directive({\r\n  selector: '[uiSrefActive],[uiSrefActiveEq]',\r\n  hostDirectives: [{\r\n    directive: UISrefStatus,\r\n    outputs: ['uiSrefStatus']\r\n  }],\r\n  standalone: true\r\n})\r\nexport class UISrefActive {\r\n  private _classes: string[] = [];\r\n  @Input('uiSrefActive')\r\n  set active(val: string) {\r\n    this._classes = val.split(/\\s+/);\r\n  }\r\n\r\n  private _classesEq: string[] = [];\r\n  @Input('uiSrefActiveEq')\r\n  set activeEq(val: string) {\r\n    this._classesEq = val.split(/\\s+/);\r\n  }\r\n\r\n  private _subscription: Subscription;\r\n  constructor(uiSrefStatus: UISrefStatus, rnd: Renderer2, @Host() host: ElementRef) {\r\n    this._subscription = uiSrefStatus.uiSrefStatus.subscribe((next: SrefStatus) => {\r\n      this._classes.forEach((cls) => {\r\n        if (next.active) {\r\n          rnd.addClass(host.nativeElement, cls);\r\n        } else {\r\n          rnd.removeClass(host.nativeElement, cls);\r\n        }\r\n      });\r\n      this._classesEq.forEach((cls) => {\r\n        if (next.exact) {\r\n          rnd.addClass(host.nativeElement, cls);\r\n        } else {\r\n          rnd.removeClass(host.nativeElement, cls);\r\n        }\r\n      });\r\n    });\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    this._subscription.unsubscribe();\r\n  }\r\n}\r\n","import { UISref, AnchorUISref } from './uiSref';\r\nimport { UISrefActive } from './uiSrefActive';\r\nimport { UIView } from './uiView';\r\nimport { UISrefStatus } from './uiSrefStatus';\r\n\r\nexport * from './uiView';\r\nexport * from './uiSref';\r\nexport * from './uiSrefStatus';\r\nexport * from './uiSrefActive';\r\n\r\n/** @internal */\r\nexport const _UIROUTER_DIRECTIVES = [UISref, AnchorUISref, UIView, UISrefActive, UISrefStatus];\r\n\r\n/**\r\n * References to the UI-Router directive classes, for use within a @Component's `directives:` property\r\n * @deprecated use [[UIRouterModule]]\r\n * @internal\r\n */\r\nexport const UIROUTER_DIRECTIVES = _UIROUTER_DIRECTIVES;\r\n","import { InjectionToken } from '@angular/core';\r\n/** @hidden */ export const UIROUTER_ROOT_MODULE = new InjectionToken('UIRouter Root Module');\r\n/** @hidden */ export const UIROUTER_MODULE_TOKEN = new InjectionToken('UIRouter Module');\r\n/** @hidden */ export const UIROUTER_STATES = new InjectionToken('UIRouter States');\r\n","import { UIRouter, isFunction, StateObject } from '@uirouter/core';\r\nimport { StatesModule, RootModule } from './uiRouterNgModule';\r\nimport { Injector } from '@angular/core';\r\nimport { isDefined } from '@uirouter/core';\r\n\r\nexport function applyModuleConfig(uiRouter: UIRouter, injector: Injector, module: StatesModule = {}): StateObject[] {\r\n  if (isFunction(module.config)) {\r\n    module.config(uiRouter, injector, module);\r\n  }\r\n\r\n  const states = module.states || [];\r\n  return states.map((state) => uiRouter.stateRegistry.register(state));\r\n}\r\n\r\nexport function applyRootModuleConfig(uiRouter: UIRouter, injector: Injector, module: RootModule) {\r\n  isDefined(module.deferIntercept) && uiRouter.urlService.deferIntercept(module.deferIntercept);\r\n  isDefined(module.otherwise) && uiRouter.urlService.rules.otherwise(module.otherwise);\r\n  isDefined(module.initial) && uiRouter.urlService.rules.initial(module.initial);\r\n}\r\n","import { NgModuleRef, Injector, Type, createNgModule, InjectionToken, isStandalone } from '@angular/core';\r\nimport {\r\n  Transition,\r\n  LazyLoadResult,\r\n  UIRouter,\r\n  Resolvable,\r\n  NATIVE_INJECTOR_TOKEN,\r\n  unnestR,\r\n  inArray,\r\n  StateObject,\r\n  uniqR,\r\n  StateDeclaration,\r\n} from '@uirouter/core';\r\nimport { UIROUTER_MODULE_TOKEN, UIROUTER_ROOT_MODULE } from '../injectionTokens';\r\nimport { RootModule, StatesModule } from '../uiRouterNgModule';\r\nimport { applyModuleConfig } from '../uiRouterConfig';\r\nimport { Ng2StateDeclaration } from '../interface';\r\n\r\n/**\r\n * A function that returns an NgModule, or a promise for an NgModule\r\n *\r\n * #### Example:\r\n * ```js\r\n * export function loadFooModule() {\r\n *   return import('../foo/foo.module').then(result => result.FooModule);\r\n * }\r\n * ```\r\n */\r\nexport type ModuleTypeCallback<T = unknown> = () => Type<T> | Promise<Type<T>>;\r\n\r\n/**\r\n * Returns a function which lazy loads a nested module\r\n *\r\n * This is primarily used by the [[ng2LazyLoadBuilder]] when processing [[Ng2StateDeclaration.loadChildren]].\r\n *\r\n * It could also be used manually as a [[StateDeclaration.lazyLoad]] property to lazy load an `NgModule` and its state(s).\r\n *\r\n * #### Example:\r\n * ```ts\r\n * var futureState = {\r\n *   name: 'home.**',\r\n *   url: '/home',\r\n *   lazyLoad: loadNgModule(() => import('./home/home.module').then(result => result.HomeModule))\r\n * }\r\n * ```\r\n *\r\n *\r\n * @param moduleToLoad function which loads the NgModule code which should\r\n *    return a reference to  the `NgModule` class being loaded (or a `Promise` for it).\r\n *\r\n * @returns A function which takes a transition, which:\r\n * - Gets the Injector (scoped properly for the destination state)\r\n * - Loads and creates the NgModule\r\n * - Finds the \"replacement state\" for the target state, and adds the new NgModule Injector to it (as a resolve)\r\n * - Returns the new states array\r\n */\r\nexport function loadNgModule<T>(\r\n  moduleToLoad: ModuleTypeCallback<T>\r\n): (transition: Transition, stateObject: StateDeclaration) => Promise<LazyLoadResult> {\r\n  return (transition: Transition, stateObject: StateDeclaration) => {\r\n\r\n    const ng2Injector = transition.injector().get(NATIVE_INJECTOR_TOKEN);\r\n\r\n    return loadModuleFactory(moduleToLoad, ng2Injector)\r\n      .then(moduleRef => applyNgModule(moduleRef, ng2Injector, stateObject));\r\n  };\r\n}\r\n\r\n/**\r\n * Returns the module factory that can be used to instantiate a module\r\n *\r\n * For a Type<any> or Promise<Type<any>> this:\r\n * - Compiles the component type (if not running with AOT)\r\n * - Returns the NgModuleFactory resulting from compilation (or direct loading if using AOT) as a Promise\r\n *\r\n * @internal\r\n */\r\nexport function loadModuleFactory<T>(\r\n  moduleToLoad: ModuleTypeCallback<T>,\r\n  ng2Injector: Injector\r\n): Promise<NgModuleRef<T>> {\r\n\r\n  return Promise.resolve(moduleToLoad())\r\n    .then(_unwrapEsModuleDefault)\r\n    .then((t: Type<T>) => createNgModule(t, ng2Injector));\r\n}\r\n\r\nfunction _unwrapEsModuleDefault(x) {\r\n  return x && x.__esModule && x['default'] ? x['default'] : x;\r\n}\r\n\r\n/**\r\n * Apply the UI-Router Modules found in the lazy loaded module.\r\n *\r\n * Apply the Lazy Loaded NgModule's newly created Injector to the right state in the state tree.\r\n *\r\n * Lazy loading uses a placeholder state which is removed (and replaced) after the module is loaded.\r\n * The NgModule should include a state with the same name as the placeholder.\r\n *\r\n * Find the *newly loaded state* with the same name as the *placeholder state*.\r\n * The NgModule's Injector (and ComponentFactoryResolver) will be added to that state.\r\n * The Injector/Factory are used when creating Components for the `replacement` state and all its children.\r\n *\r\n * @internal\r\n */\r\nexport function applyNgModule<T>(\r\n  ng2Module: NgModuleRef<T>,\r\n  parentInjector: Injector,\r\n  lazyLoadState: StateDeclaration\r\n): LazyLoadResult {\r\n  const injector = ng2Module.injector;\r\n  const uiRouter: UIRouter = injector.get(UIRouter);\r\n  const registry = uiRouter.stateRegistry;\r\n\r\n  const originalName = lazyLoadState.name;\r\n  const originalState = registry.get(originalName);\r\n  // Check if it's a future state (ends with .**)\r\n  const isFuture = /^(.*)\\.\\*\\*$/.exec(originalName);\r\n  // Final name (without the .**)\r\n  const replacementName = isFuture && isFuture[1];\r\n\r\n  const newRootModules = multiProviderParentChildDelta(parentInjector, injector, UIROUTER_ROOT_MODULE).reduce(\r\n    uniqR,\r\n    []\r\n  ) as RootModule[];\r\n  const newChildModules = multiProviderParentChildDelta(parentInjector, injector, UIROUTER_MODULE_TOKEN).reduce(\r\n    uniqR,\r\n    []\r\n  ) as StatesModule[];\r\n\r\n  if (newRootModules.length) {\r\n    console.log(newRootModules); // tslint:disable-line:no-console\r\n    throw new Error('Lazy loaded modules should not contain a UIRouterModule.forRoot() module');\r\n  }\r\n\r\n  const newStateObjects: StateObject[] = newChildModules\r\n    .map((module) => applyModuleConfig(uiRouter, injector, module))\r\n    .reduce(unnestR, [])\r\n    .reduce(uniqR, []);\r\n\r\n  if (isFuture) {\r\n    const replacementState = registry.get(replacementName);\r\n    if (!replacementState || replacementState === originalState) {\r\n      throw new Error(\r\n        `The Future State named '${originalName}' lazy loaded an NgModule. ` +\r\n          `The lazy loaded NgModule must have a state named '${replacementName}' ` +\r\n          `which replaces the (placeholder) '${originalName}' Future State. ` +\r\n          `Add a '${replacementName}' state to the lazy loaded NgModule ` +\r\n          `using UIRouterModule.forChild({ states: CHILD_STATES }).`\r\n      );\r\n    }\r\n  }\r\n\r\n  // Supply the newly loaded states with the Injector from the lazy loaded NgModule.\r\n  // If a tree of states is lazy loaded, only add the injector to the root of the lazy loaded tree.\r\n  // The children will get the injector by resolve inheritance.\r\n  const newParentStates = newStateObjects.filter((state) => !inArray(newStateObjects, state.parent));\r\n\r\n  // Add the Injector to the top of the lazy loaded state tree as a resolve\r\n  newParentStates.forEach((state) => state.resolvables.push(Resolvable.fromData(NATIVE_INJECTOR_TOKEN, injector)));\r\n\r\n  return {};\r\n}\r\n\r\n/**\r\n * Returns the new dependency injection values from the Child Injector\r\n *\r\n * When a DI token is defined as multi: true, the child injector\r\n * can add new values for the token.\r\n *\r\n * This function returns the values added by the child injector,  and excludes all values from the parent injector.\r\n *\r\n * @internal\r\n */\r\nexport function multiProviderParentChildDelta<T>(parent: Injector, child: Injector, token: InjectionToken<T>): RootModule[] {\r\n  const childVals: RootModule[] = child.get<RootModule[]>(token, []);\r\n  const parentVals: RootModule[] = parent.get<RootModule[]>(token, []);\r\n  return childVals.filter((val) => parentVals.indexOf(val) === -1);\r\n}\r\n\r\n/**\r\n * A function that returns a Component, or a promise for a Component\r\n *\r\n * #### Example:\r\n * ```ts\r\n * export function loadFooComponent() {\r\n *   return import('../foo/foo.component').then(result => result.FooComponent);\r\n * }\r\n * ```\r\n */\r\nexport type ComponentTypeCallback<T> = ModuleTypeCallback<T>;\r\n\r\n/**\r\n * Returns a function which lazy loads a standalone component for the target state\r\n *\r\n * #### Example:\r\n * ```ts\r\n * var futureComponentState = {\r\n *   name: 'home',\r\n *   url: '/home',\r\n *   lazyLoad: loadComponent(() => import('./home.component').then(result => result.HomeComponent))\r\n * }\r\n * ```\r\n *\r\n * @param callback function which loads the Component code which should\r\n *    return a reference to  the `Component` class being loaded (or a `Promise` for it).\r\n *\r\n * @returns A function which takes a transition, stateObject, and:\r\n * - Loads a standalone component\r\n * - replaces the component configuration of the stateObject.\r\n * - Returns the new states array\r\n */\r\nexport function loadComponent<T>(\r\n  callback: ComponentTypeCallback<T>\r\n): (transition: Transition, stateObject: Ng2StateDeclaration) => Promise<LazyLoadResult> {\r\n  return (transition: Transition, stateObject: Ng2StateDeclaration) => {\r\n\r\n    return Promise.resolve(callback())\r\n      .then(_unwrapEsModuleDefault)\r\n      .then((component: Type<T>) => applyComponent(component, transition, stateObject))\r\n  }\r\n}\r\n\r\n/**\r\n * Apply the lazy-loaded component to the stateObject.\r\n *\r\n * @internal\r\n * @param component reference to the component class\r\n * @param transition Transition object reference\r\n * @param stateObject target state configuration object\r\n *\r\n * @returns the new states array\r\n */\r\nexport function applyComponent<T>(\r\n  component: Type<T>,\r\n  transition: Transition,\r\n  stateObject: Ng2StateDeclaration\r\n): LazyLoadResult {\r\n\r\n  if (!isStandalone(component)) throw new Error(\"Is not a standalone component.\");\r\n\r\n  const registry = transition.router.stateRegistry;\r\n  const current = stateObject.component;\r\n  stateObject.component = component || current;\r\n  const removed = registry.deregister(stateObject).map(child => child.self);\r\n  const children = removed.filter(i => i.name != stateObject.name);\r\n\r\n  return { states: [stateObject, ...children] }\r\n}\r\n","import { LazyLoadResult, Transition, StateDeclaration } from '@uirouter/core'; // has or is using\r\nimport { BuilderFunction, StateObject } from '@uirouter/core';\r\nimport { loadComponent, loadNgModule } from '../lazyLoad/lazyLoadNgModule';\r\n\r\n/**\r\n * This is a [[StateBuilder.builder]] function for ngModule lazy loading in Angular.\r\n *\r\n * When the [[StateBuilder]] builds a [[State]] object from a raw [[StateDeclaration]], this builder\r\n * decorates the `lazyLoad` property for states that have a [[Ng2StateDeclaration.ngModule]] declaration.\r\n *\r\n * If the state has a [[Ng2StateDeclaration.ngModule]], it will create a `lazyLoad` function\r\n * that in turn calls `loadNgModule(loadNgModuleFn)`.\r\n *\r\n * #### Example:\r\n * A state that has a `ngModule`\r\n * ```js\r\n * var decl = {\r\n *   ngModule: () => import('./childModule.ts')\r\n * }\r\n * ```\r\n * would build a state with a `lazyLoad` function like:\r\n * ```js\r\n * import { loadNgModule } from \"@uirouter/angular\";\r\n * var decl = {\r\n *   lazyLoad: loadNgModule(() => import('./childModule.ts')\r\n * }\r\n * ```\r\n *\r\n * If the state has both a `ngModule:` *and* a `lazyLoad`, then the `lazyLoad` is run first.\r\n *\r\n * #### Example:\r\n * ```js\r\n * var decl = {\r\n *   lazyLoad: () => import('third-party-library'),\r\n *   ngModule: () => import('./childModule.ts')\r\n * }\r\n * ```\r\n * would build a state with a `lazyLoad` function like:\r\n * ```js\r\n * import { loadNgModule } from \"@uirouter/angular\";\r\n * var decl = {\r\n *   lazyLoad: () => import('third-party-library')\r\n *       .then(() => loadNgModule(() => import('./childModule.ts'))\r\n * }\r\n * ```\r\n *\r\n */\r\nexport function ng2LazyLoadBuilder(state: StateObject, parent: BuilderFunction) {\r\n  const loadComponentFn = state['loadComponent'];\r\n  const loadNgModuleFn = state['loadChildren'];\r\n  return loadComponentFn ? loadComponent(loadComponentFn) : loadNgModuleFn ? loadNgModule(loadNgModuleFn) : state.lazyLoad;\r\n}\r\n","import { BaseLocationServices, parseUrl, UIRouter } from '@uirouter/core';\r\nimport { LocationStrategy } from '@angular/common';\r\n\r\n/** A `LocationServices` that delegates to the Angular LocationStrategy */\r\nexport class Ng2LocationServices extends BaseLocationServices {\r\n  constructor(router: UIRouter, private _locationStrategy: LocationStrategy, isBrowser: boolean) {\r\n    super(router, isBrowser);\r\n\r\n    this._locationStrategy.onPopState((evt) => {\r\n      if (evt.type !== 'hashchange') {\r\n        this._listener(evt);\r\n      }\r\n    });\r\n  }\r\n\r\n  _get() {\r\n    return this._locationStrategy.path(true).replace(this._locationStrategy.getBaseHref().replace(/\\/$/, ''), '');\r\n  }\r\n\r\n  _set(state: any, title: string, url: string, replace: boolean): any {\r\n    const { path, search, hash } = parseUrl(url);\r\n\r\n    const hashWithPrefix = hash ? '#' + hash : '';\r\n    let urlPath = path;\r\n    let urlParams = search;\r\n\r\n    if (search) {\r\n      urlParams += hashWithPrefix;\r\n    } else {\r\n      urlPath += hashWithPrefix;\r\n    }\r\n\r\n    if (replace) {\r\n      this._locationStrategy.replaceState(state, title, urlPath, urlParams);\r\n    } else {\r\n      this._locationStrategy.pushState(state, title, urlPath, urlParams);\r\n    }\r\n  }\r\n\r\n  dispose(router: UIRouter) {\r\n    super.dispose(router);\r\n  }\r\n}\r\n","import { UIRouter, is, BrowserLocationConfig } from '@uirouter/core';\r\nimport { LocationStrategy, PathLocationStrategy } from '@angular/common';\r\n\r\nexport class Ng2LocationConfig extends BrowserLocationConfig {\r\n  constructor(router: UIRouter, private _locationStrategy: LocationStrategy) {\r\n    super(router, is(PathLocationStrategy)(_locationStrategy));\r\n  }\r\n\r\n  baseHref(href?: string): string {\r\n    return this._locationStrategy.getBaseHref();\r\n  }\r\n}\r\n","/**\r\n * # UI-Router for Angular (v2+)\r\n *\r\n * - [@uirouter/angular home page](https://ui-router.github.io/ng2)\r\n * - [tutorials](https://ui-router.github.io/tutorial/ng2/helloworld)\r\n * - [quick start repository](http://github.com/ui-router/quickstart-ng2)\r\n *\r\n * Getting started:\r\n *\r\n * - Use npm. Add a dependency on latest `@uirouter/angular`\r\n * - Import UI-Router classes directly from `\"@uirouter/angular\"`\r\n *\r\n * ```js\r\n * import {StateRegistry} from \"@uirouter/angular\";\r\n * ```\r\n *\r\n * - Create application states (as defined by [[Ng2StateDeclaration]]).\r\n *\r\n * ```js\r\n * export let state1: Ng2StateDeclaration = {\r\n *   name: 'state1',\r\n *   component: State1Component,\r\n *   url: '/one'\r\n * }\r\n *\r\n * export let state2: Ng2StateDeclaration = {\r\n *   name: 'state2',\r\n *   component: State2Component,\r\n *   url: '/two'\r\n * }\r\n * ```\r\n *\r\n * - Import a [[UIRouterModule.forChild]] module into your feature `NgModule`s.\r\n *\r\n * ```js\r\n * @ NgModule({\r\n *   imports: [\r\n *     SharedModule,\r\n *     UIRouterModule.forChild({ states: [state1, state2 ] })\r\n *   ],\r\n *   declarations: [\r\n *     State1Component,\r\n *     State2Component,\r\n *   ]\r\n * })\r\n * export class MyFeatureModule {}\r\n * ```\r\n *\r\n * - Import a [[UIRouterModule.forRoot]] module into your application root `NgModule`\r\n * - Either bootstrap a [[UIView]] component, or add a `<ui-view></ui-view>` viewport to your root component.\r\n *\r\n * ```js\r\n * @ NgModule({\r\n *   imports: [\r\n *     BrowserModule,\r\n *     UIRouterModule.forRoot({ states: [ homeState ] }),\r\n *     MyFeatureModule,\r\n *   ],\r\n *   declarations: [\r\n *     HomeComponent\r\n *   ]\r\n *   bootstrap: [ UIView ]\r\n * })\r\n * class RootAppModule {}\r\n *\r\n * browserPlatformDynamic.bootstrapModule(RootAppModule);\r\n * ```\r\n *\r\n * - Optionally specify a configuration class [[ChildModule.configClass]] for any module\r\n * to perform any router configuration during bootstrap or lazyload.\r\n * Pass the class to [[UIRouterModule.forRoot]] or [[UIRouterModule.forChild]].\r\n *\r\n * ```js\r\n * import {UIRouter} from \"@uirouter/angular\";\r\n *\r\n * @ Injectable()\r\n * export class MyUIRouterConfig {\r\n *   // Constructor is injectable\r\n *   constructor(uiRouter: UIRouter) {\r\n *     uiRouter.urlMatcherFactory.type('datetime', myDateTimeParamType);\r\n *   }\r\n * }\r\n * ```\r\n */\r\nimport { Injector, Provider, PLATFORM_ID, APP_INITIALIZER } from '@angular/core';\r\nimport { isPlatformBrowser } from '@angular/common';\r\nimport {\r\n  UIRouter,\r\n  PathNode,\r\n  StateRegistry,\r\n  StateService,\r\n  TransitionService,\r\n  UrlMatcherFactory,\r\n  UrlRouter,\r\n  ViewService,\r\n  UrlService,\r\n  UIRouterGlobals,\r\n  services,\r\n  Resolvable,\r\n  NATIVE_INJECTOR_TOKEN,\r\n} from '@uirouter/core';\r\nimport { UIView, ParentUIViewInject } from './directives/uiView';\r\nimport { UIROUTER_MODULE_TOKEN, UIROUTER_ROOT_MODULE } from './injectionTokens';\r\nimport { ng2ViewsBuilder, Ng2ViewConfig } from './statebuilders/views';\r\nimport { Ng2ViewDeclaration } from './interface';\r\nimport { applyRootModuleConfig, applyModuleConfig } from './uiRouterConfig';\r\nimport { RootModule, StatesModule } from './uiRouterNgModule';\r\nimport { servicesPlugin, ServicesPlugin } from '@uirouter/core';\r\nimport { ng2LazyLoadBuilder } from './statebuilders/lazyLoad';\r\nimport { UIRouterRx } from '@uirouter/rx';\r\nimport { LocationStrategy } from '@angular/common';\r\nimport { Ng2LocationServices } from './location/locationService';\r\nimport { Ng2LocationConfig } from './location/locationConfig';\r\n\r\n/**\r\n * This is a factory function for a UIRouter instance\r\n *\r\n * Creates a UIRouter instance and configures it for Angular, then invokes router bootstrap.\r\n * This function is used as an Angular `useFactory` Provider.\r\n */\r\nexport function uiRouterFactory(\r\n  locationStrategy: LocationStrategy,\r\n  rootModules: RootModule[],\r\n  modules: StatesModule[],\r\n  injector: Injector\r\n) {\r\n  if (rootModules.length !== 1) {\r\n    throw new Error(\"Exactly one UIRouterModule.forRoot() should be in the bootstrapped app module's imports: []\");\r\n  }\r\n\r\n  // ----------------- Create router -----------------\r\n  // Create a new ng2 UIRouter and configure it for ng2\r\n  const router = new UIRouter();\r\n\r\n  // Add RxJS plugin\r\n  router.plugin(UIRouterRx);\r\n\r\n  // Add $q-like and $injector-like service APIs\r\n  router.plugin<ServicesPlugin>(servicesPlugin);\r\n\r\n  // ----------------- Monkey Patches ----------------\r\n  // Monkey patch the services.$injector to use the root ng2 Injector\r\n  services.$injector.get = injector.get.bind(injector);\r\n\r\n  // ----------------- Configure for ng2 -------------\r\n  router.locationService = new Ng2LocationServices(\r\n    router,\r\n    locationStrategy,\r\n    isPlatformBrowser(injector.get(PLATFORM_ID))\r\n  );\r\n  router.locationConfig = new Ng2LocationConfig(router, locationStrategy);\r\n\r\n  // Apply ng2 ui-view handling code\r\n  const viewConfigFactory = (path: PathNode[], config: Ng2ViewDeclaration) => new Ng2ViewConfig(path, config);\r\n  router.viewService._pluginapi._viewConfigFactory('ng2', viewConfigFactory);\r\n\r\n  // Apply statebuilder decorator for ng2 NgModule registration\r\n  const registry = router.stateRegistry;\r\n  registry.decorator('views', ng2ViewsBuilder);\r\n  registry.decorator('lazyLoad', ng2LazyLoadBuilder);\r\n\r\n  // Prep the tree of NgModule by placing the root NgModule's Injector on the root state.\r\n  const ng2InjectorResolvable = Resolvable.fromData(NATIVE_INJECTOR_TOKEN, injector);\r\n  registry.root().resolvables.push(ng2InjectorResolvable);\r\n\r\n  // Auto-flush the parameter type queue\r\n  router.urlMatcherFactory.$get();\r\n\r\n  // ----------------- Initialize router -------------\r\n  rootModules.forEach((moduleConfig) => applyRootModuleConfig(router, injector, moduleConfig));\r\n  modules.forEach((moduleConfig) => applyModuleConfig(router, injector, moduleConfig));\r\n\r\n  return router;\r\n}\r\n\r\n// Start monitoring the URL when the app starts\r\nexport function appInitializer(router: UIRouter) {\r\n  return () => {\r\n    if (!router.urlRouter.interceptDeferred) {\r\n      router.urlService.listen();\r\n      router.urlService.sync();\r\n    }\r\n  };\r\n}\r\n\r\nexport function parentUIViewInjectFactory(r: StateRegistry) {\r\n  return { fqn: null, context: r.root() } as ParentUIViewInject;\r\n}\r\n\r\nexport const _UIROUTER_INSTANCE_PROVIDERS: Provider[] = [\r\n  {\r\n    provide: UIRouter,\r\n    useFactory: uiRouterFactory,\r\n    deps: [LocationStrategy, UIROUTER_ROOT_MODULE, UIROUTER_MODULE_TOKEN, Injector],\r\n  },\r\n  { provide: UIView.PARENT_INJECT, useFactory: parentUIViewInjectFactory, deps: [StateRegistry] },\r\n  { provide: APP_INITIALIZER, useFactory: appInitializer, deps: [UIRouter], multi: true },\r\n];\r\n\r\nexport function fnStateService(r: UIRouter) {\r\n  return r.stateService;\r\n}\r\nexport function fnTransitionService(r: UIRouter) {\r\n  return r.transitionService;\r\n}\r\nexport function fnUrlMatcherFactory(r: UIRouter) {\r\n  return r.urlMatcherFactory;\r\n}\r\nexport function fnUrlRouter(r: UIRouter) {\r\n  return r.urlRouter;\r\n}\r\nexport function fnUrlService(r: UIRouter) {\r\n  return r.urlService;\r\n}\r\nexport function fnViewService(r: UIRouter) {\r\n  return r.viewService;\r\n}\r\nexport function fnStateRegistry(r: UIRouter) {\r\n  return r.stateRegistry;\r\n}\r\nexport function fnGlobals(r: any) {\r\n  return r.globals;\r\n}\r\n\r\nexport const _UIROUTER_SERVICE_PROVIDERS: Provider[] = [\r\n  { provide: StateService, useFactory: fnStateService, deps: [UIRouter] },\r\n  { provide: TransitionService, useFactory: fnTransitionService, deps: [UIRouter] },\r\n  { provide: UrlMatcherFactory, useFactory: fnUrlMatcherFactory, deps: [UIRouter] },\r\n  { provide: UrlRouter, useFactory: fnUrlRouter, deps: [UIRouter] },\r\n  { provide: UrlService, useFactory: fnUrlService, deps: [UIRouter] },\r\n  { provide: ViewService, useFactory: fnViewService, deps: [UIRouter] },\r\n  { provide: StateRegistry, useFactory: fnStateRegistry, deps: [UIRouter] },\r\n  { provide: UIRouterGlobals, useFactory: fnGlobals, deps: [UIRouter] },\r\n];\r\n\r\n/**\r\n * The UI-Router providers, for use in your application bootstrap\r\n *\r\n * @deprecated use [[UIRouterModule.forRoot]]\r\n */\r\nexport const UIROUTER_PROVIDERS: Provider[] = _UIROUTER_INSTANCE_PROVIDERS.concat(_UIROUTER_SERVICE_PROVIDERS);\r\n","import { UIROUTER_MODULE_TOKEN, UIROUTER_ROOT_MODULE } from './injectionTokens';\r\nimport { Ng2StateDeclaration } from './interface';\r\nimport {\r\n  NgModule,\r\n  ModuleWithProviders,\r\n  Provider,\r\n  Injector,\r\n  APP_INITIALIZER,\r\n} from '@angular/core';\r\nimport { LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';\r\nimport { _UIROUTER_DIRECTIVES } from './directives/directives';\r\nimport { UrlRuleHandlerFn, TargetState, TargetStateDef, UIRouter, TransitionService } from '@uirouter/core';\r\nimport { _UIROUTER_INSTANCE_PROVIDERS, _UIROUTER_SERVICE_PROVIDERS } from './providers';\r\n\r\n// Delay angular bootstrap until first transition is successful, for SSR.\r\n// See https://github.com/ui-router/angular/pull/127\r\nexport function onTransitionReady(transitionService: TransitionService, root: RootModule[]) {\r\n  const mod = root[0];\r\n  if (!mod || !mod.deferInitialRender) {\r\n    return () => Promise.resolve();\r\n  }\r\n\r\n  return () =>\r\n    new Promise((resolve) => {\r\n      const hook = (trans) => {\r\n        trans.promise.then(resolve, resolve);\r\n      };\r\n      transitionService.onStart({}, hook, { invokeLimit: 1 });\r\n    });\r\n}\r\n\r\nexport function makeRootProviders(module: RootModule): Provider[] {\r\n  return [\r\n    { provide: UIROUTER_ROOT_MODULE, useValue: module, multi: true },\r\n    { provide: UIROUTER_MODULE_TOKEN, useValue: module, multi: true },\r\n    {\r\n      provide: APP_INITIALIZER,\r\n      useFactory: onTransitionReady,\r\n      deps: [TransitionService, UIROUTER_ROOT_MODULE],\r\n      multi: true,\r\n    },\r\n  ];\r\n}\r\n\r\nexport function makeChildProviders(module: StatesModule): Provider[] {\r\n  return [\r\n    { provide: UIROUTER_MODULE_TOKEN, useValue: module, multi: true },\r\n  ];\r\n}\r\n\r\nexport function locationStrategy(useHash) {\r\n  return { provide: LocationStrategy, useClass: useHash ? HashLocationStrategy : PathLocationStrategy };\r\n}\r\n\r\n/**\r\n * Creates UI-Router Modules\r\n *\r\n * This class has two static factory methods which create UIRouter Modules.\r\n * A UI-Router Module is an [Angular NgModule](https://angular.io/docs/ts/latest/guide/ngmodule.html)\r\n * with support for UI-Router.\r\n *\r\n * ### UIRouter Directives\r\n *\r\n * When a UI-Router Module is imported into a `NgModule`, that module's components\r\n * can use the UIRouter Directives such as [[UIView]], [[UISref]], [[UISrefActive]].\r\n *\r\n * ### State Definitions\r\n *\r\n * State definitions found in the `states:` property are provided to the Dependency Injector.\r\n * This enables UI-Router to automatically register the states with the [[StateRegistry]] at bootstrap (and during lazy load).\r\n */\r\n@NgModule({\r\n  imports: [\r\n    _UIROUTER_DIRECTIVES\r\n  ],\r\n  exports: [_UIROUTER_DIRECTIVES],\r\n})\r\nexport class UIRouterModule {\r\n  /**\r\n   * Creates a UI-Router Module for the root (bootstrapped) application module to import\r\n   *\r\n   * This factory function creates an [Angular NgModule](https://angular.io/docs/ts/latest/guide/ngmodule.html)\r\n   * with UI-Router support.\r\n   *\r\n   * The `forRoot` module should be added to the `imports:` of the `NgModule` being bootstrapped.\r\n   * An application should only create and import a single `NgModule` using `forRoot()`.\r\n   * All other modules should be created using [[UIRouterModule.forChild]].\r\n   *\r\n   * Unlike `forChild`, an `NgModule` returned by this factory provides the [[UIRouter]] singleton object.\r\n   * This factory also accepts root-level router configuration.\r\n   * These are the only differences between `forRoot` and `forChild`.\r\n   *\r\n   * Example:\r\n   * ```js\r\n   * let routerConfig = {\r\n   *   otherwise: '/home',\r\n   *   states: [homeState, aboutState]\r\n   * };\r\n   *\r\n   * @ NgModule({\r\n   *   imports: [\r\n   *     BrowserModule,\r\n   *     UIRouterModule.forRoot(routerConfig),\r\n   *     FeatureModule1\r\n   *   ]\r\n   * })\r\n   * class MyRootAppModule {}\r\n   *\r\n   * browserPlatformDynamic.bootstrapModule(MyRootAppModule);\r\n   * ```\r\n   *\r\n   * @param config declarative UI-Router configuration\r\n   * @returns an `NgModule` which provides the [[UIRouter]] singleton instance\r\n   */\r\n  static forRoot(config: RootModule = {}): ModuleWithProviders<UIRouterModule> {\r\n    return {\r\n      ngModule: UIRouterModule,\r\n      providers: [\r\n        _UIROUTER_INSTANCE_PROVIDERS,\r\n        _UIROUTER_SERVICE_PROVIDERS,\r\n        locationStrategy(config.useHash),\r\n        ...makeRootProviders(config),\r\n      ],\r\n    };\r\n  }\r\n\r\n  /**\r\n   * Creates an `NgModule` for a UIRouter module\r\n   *\r\n   * This function creates an [Angular NgModule](https://angular.io/docs/ts/latest/guide/ngmodule.html)\r\n   * with UI-Router support.\r\n   *\r\n   * #### Example:\r\n   * ```js\r\n   * var homeState = { name: 'home', url: '/home', component: Home };\r\n   * var aboutState = { name: 'about', url: '/about', component: About };\r\n   *\r\n   * @ NgModule({\r\n   *   imports: [\r\n   *     UIRouterModule.forChild({ states: [ homeState, aboutState ] }),\r\n   *     SharedModule,\r\n   *   ],\r\n   *   declarations: [ Home, About ],\r\n   * })\r\n   * export class AppModule {};\r\n   * ```\r\n   *\r\n   * @param module UI-Router module options\r\n   * @returns an `NgModule`\r\n   */\r\n  static forChild(module: StatesModule = {}): ModuleWithProviders<UIRouterModule> {\r\n    return {\r\n      ngModule: UIRouterModule,\r\n      providers: makeChildProviders(module),\r\n    };\r\n  }\r\n}\r\n\r\n/**\r\n * UI-Router declarative configuration which can be provided to [[UIRouterModule.forRoot]]\r\n */\r\nexport interface RootModule extends StatesModule {\r\n  /**\r\n   * Chooses a `LocationStrategy`.\r\n   *\r\n   * The location strategy enables either HTML5 Push State\r\n   * (Requires server-side support) or \"HashBang\" URLs.\r\n   *\r\n   * When `false`, uses [`PathLocationStrategy`](https://angular.io/docs/ts/latest/api/common/index/PathLocationStrategy-class.html)\r\n   * When `true`, uses [`HashLocationStrategy`](https://angular.io/docs/ts/latest/api/common/index/HashLocationStrategy-class.html)\r\n   *\r\n   * Defaults to `false`\r\n   */\r\n  useHash?: boolean;\r\n\r\n  /**\r\n   * Configures the `otherwise` rule, which chooses the state or URL to activate when no other routes matched.\r\n   *\r\n   * See: [[UrlRulesApi.otherwise]].\r\n   */\r\n  otherwise?: string | UrlRuleHandlerFn | TargetState | TargetStateDef;\r\n\r\n  /**\r\n   * Configures the `initial` rule, which chooses the state or URL to activate when the\r\n   * application initially starts, and no other routes matched.\r\n   *\r\n   * See: [[UrlRulesApi.initial]].\r\n   */\r\n  initial?: string | UrlRuleHandlerFn | TargetState | TargetStateDef;\r\n\r\n  /**\r\n   * Sets [[UrlRouterProvider.deferIntercept]]\r\n   */\r\n  deferIntercept?: boolean;\r\n\r\n  /**\r\n   * Tells Angular to defer the first render until after the initial transition is complete.\r\n   *\r\n   * When `true`, adds an async `APP_INITIALIZER` which is resolved after any `onSuccess` or `onError`.\r\n   * The initializer stops angular from rendering the root component until after the first transition completes.\r\n   * This may prevent initial page flicker while the state is being loaded.\r\n   *\r\n   * Defaults to `false`\r\n   */\r\n  deferInitialRender?: boolean;\r\n}\r\n\r\n/**\r\n * UI-Router Module declarative configuration which can be passed to [[UIRouterModule.forChild]]\r\n */\r\nexport interface StatesModule {\r\n  /**\r\n   * The module's UI-Router states\r\n   *\r\n   * This list of [[Ng2StateDeclaration]] objects will be registered with the [[StateRegistry]].\r\n   */\r\n  states?: Ng2StateDeclaration[];\r\n\r\n  /**\r\n   * A UI-Router Module's imperative configuration\r\n   *\r\n   * If a UI-Router Module needs to perform some configuration (such as registering\r\n   * parameter types or Transition Hooks) a `configFn` should be supplied.\r\n   * The function will be passed the `UIRouter` instance, the module's `Injector`,\r\n   * and the module object.\r\n   *\r\n   * #### Example:\r\n   * ```js\r\n   * import { Injector } from \"@angular/core\";\r\n   * import { UIRouter } from \"@uirouter/angular\";\r\n   * import { requireAuthHook } from \"./requireAuthHook\";\r\n   * import { MyService } from \"./myService\";\r\n   *\r\n   * export function configureMyModule(uiRouter: UIRouter, injector: Injector, module: StatesModule) {\r\n   *   // Get UIRouter services off the UIRouter object\r\n   *   let urlConfig = uiRouter.urlService.config;\r\n   *   let transitionService = uiRouter.transitionService;\r\n   *   uiRouter.trace.enable(\"TRANSITION\");\r\n   *\r\n   *   transitionService.onBefore({ to: (state) => state.requiresAuth }, requireAuthHook);\r\n   *\r\n   *   // Create a slug type based on the string type\r\n   *   let builtInStringType = urlConfig.type('string');\r\n   *   let slugType = Object.assign({}, builtInStringType, { encode: (str) => str, decode: (str) => str });\r\n   *   urlConfig.type('slug', slugType);\r\n   *\r\n   *   // Inject arbitrary services from DI using the Injector argument\r\n   *   let myService: MyService = injector.get(MyService)\r\n   *   myService.useFastMode();\r\n   * }\r\n   * ```\r\n   *\r\n   * ```js\r\n   * @NgModule({\r\n   *   imports: [\r\n   *     UIRouterModule.forChild({ states: STATES, config: configureMyModule });\r\n   *   ]\r\n   * })\r\n   * class MyModule {}\r\n   * ```\r\n   */\r\n  config?: (uiRouterInstance: UIRouter, injector: Injector, module: StatesModule) => any;\r\n}\r\n","import { EnvironmentProviders, makeEnvironmentProviders } from \"@angular/core\";\r\nimport { locationStrategy, makeRootProviders, RootModule } from \"./uiRouterNgModule\";\r\nimport { _UIROUTER_INSTANCE_PROVIDERS, _UIROUTER_SERVICE_PROVIDERS } from \"./providers\";\r\n\r\n/**\r\n * Sets up providers necessary to enable UI-Router for the application. Intended as a replacement\r\n * for [[UIRouterModule.forRoot]] in newer standalone based applications.\r\n *\r\n * Example:\r\n * ```js\r\n * const routerConfig = {\r\n *   otherwise: '/home',\r\n *   states: [homeState, aboutState]\r\n * };\r\n *\r\n * const appConfig: ApplicationConfig = {\r\n *   providers: [\r\n *     provideZoneChangeDetection({ eventCoalescing: true }),\r\n *     provideUIRouter(routerConfig)\r\n *   ]\r\n * };\r\n *\r\n * bootstrapApplication(AppComponent, appConfig)\r\n *  .catch((err) => console.error(err));\r\n * ```\r\n *\r\n * @param config declarative UI-Router configuration\r\n * @returns an `EnvironmentProviders` which provides the [[UIRouter]] singleton instance\r\n */\r\nexport function provideUIRouter(config: RootModule = {}): EnvironmentProviders {\r\n  return makeEnvironmentProviders([\r\n    _UIROUTER_INSTANCE_PROVIDERS,\r\n    _UIROUTER_SERVICE_PROVIDERS,\r\n    locationStrategy(config.useHash),\r\n    ...makeRootProviders(config),\r\n  ]);\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["id","i1.UISref","i2","i1.UISrefStatus","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