{"version":3,"file":"upgrade.umd.js","sources":["../../../../packages/upgrade/src/dynamic/upgrade_adapter.ts","../../../../packages/upgrade/public_api.ts","../../../../packages/upgrade/src/dynamic/upgrade_ng1_adapter.ts","../../../../packages/upgrade/src/common/upgrade_helper.ts","../../../../packages/upgrade/src/common/downgrade_component.ts","../../../../packages/upgrade/src/common/downgrade_injectable.ts","../../../../packages/upgrade/src/common/downgrade_component_adapter.ts","../../../../packages/upgrade/src/common/util.ts","../../../../packages/upgrade/src/common/component_info.ts","../../../../packages/upgrade/src/common/constants.ts","../../../../packages/upgrade/src/common/angular1.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. 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\nimport {Compiler, CompilerOptions, Directive, Injector, NgModule, NgModuleRef, NgZone, Provider, Testability, Type} from '@angular/core';\nimport {platformBrowserDynamic} from '@angular/platform-browser-dynamic';\n\nimport * as angular from '../common/angular1';\nimport {$$TESTABILITY, $COMPILE, $INJECTOR, $ROOT_SCOPE, COMPILER_KEY, INJECTOR_KEY, NG_ZONE_KEY} from '../common/constants';\nimport {downgradeComponent} from '../common/downgrade_component';\nimport {downgradeInjectable} from '../common/downgrade_injectable';\nimport {Deferred, controllerKey, onError} from '../common/util';\n\nimport {UpgradeNg1ComponentAdapterBuilder} from './upgrade_ng1_adapter';\n\nlet /** @type {?} */ upgradeCount: number = 0;\n/**\n * Use `UpgradeAdapter` to allow AngularJS and Angular to coexist in a single application.\n * \n * The `UpgradeAdapter` allows:\n * 1. creation of Angular component from AngularJS component directive\n * (See [UpgradeAdapter#upgradeNg1Component()])\n * 2. creation of AngularJS directive from Angular component.\n * (See [UpgradeAdapter#downgradeNg2Component()])\n * 3. Bootstrapping of a hybrid Angular application which contains both of the frameworks\n * coexisting in a single application.\n * \n * ## Mental Model\n * \n * When reasoning about how a hybrid application works it is useful to have a mental model which\n * describes what is happening and explains what is happening at the lowest level.\n * \n * 1. There are two independent frameworks running in a single application, each framework treats\n * the other as a black box.\n * 2. Each DOM element on the page is owned exactly by one framework. Whichever framework\n * instantiated the element is the owner. Each framework only updates/interacts with its own\n * DOM elements and ignores others.\n * 3. AngularJS directives always execute inside AngularJS framework codebase regardless of\n * where they are instantiated.\n * 4. Angular components always execute inside Angular framework codebase regardless of\n * where they are instantiated.\n * 5. An AngularJS component can be upgraded to an Angular component. This creates an\n * Angular directive, which bootstraps the AngularJS component directive in that location.\n * 6. An Angular component can be downgraded to an AngularJS component directive. This creates\n * an AngularJS directive, which bootstraps the Angular component in that location.\n * 7. Whenever an adapter component is instantiated the host element is owned by the framework\n * doing the instantiation. The other framework then instantiates and owns the view for that\n * component. This implies that component bindings will always follow the semantics of the\n * instantiation framework. The syntax is always that of Angular syntax.\n * 8. AngularJS is always bootstrapped first and owns the bottom most view.\n * 9. The new application is running in Angular zone, and therefore it no longer needs calls to\n * `$apply()`.\n * \n * ### Example\n * \n * ```\n * const adapter = new UpgradeAdapter(forwardRef(() => MyNg2Module), myCompilerOptions);\n * const module = angular.module('myExample', []);\n * module.directive('ng2Comp', adapter.downgradeNg2Component(Ng2Component));\n * \n * module.directive('ng1Hello', function() {\n * return {\n * scope: { title: '=' },\n * template: 'ng1[Hello {{title}}!]()'\n * };\n * });\n * \n * \n * \\@Component({ \n * selector: 'ng2-comp',\n * inputs: ['name'],\n * template: 'ng2[transclude]()',\n * directives:\n * })\n * class Ng2Component {\n * }\n * \n * \\@NgModule({ \n * declarations: [Ng2Component, adapter.upgradeNg1Component('ng1Hello')],\n * imports: [BrowserModule]\n * })\n * class MyNg2Module {}\n * \n * \n * document.body.innerHTML = 'project';\n * \n * adapter.bootstrap(document.body, ['myExample']).ready(function() {\n * expect(document.body.textContent).toEqual(\n * \"ng2[ng1[Hello World!](transclude)](project)\");\n * });\n * \n * ```\n * \n * \\@stable\n */\nexport class UpgradeAdapter {\nprivate idPrefix: string = `NG2_UPGRADE_${upgradeCount++}_`;\nprivate downgradedComponents: Type[] = [];\n/**\n * An internal map of ng1 components which need to up upgraded to ng2.\n * \n * We can't upgrade until injector is instantiated and we can retrieve the component metadata.\n * For this reason we keep a list of components to upgrade until ng1 injector is bootstrapped.\n * \n * \\@internal\n */\nprivate ng1ComponentsToBeUpgraded: {[name: string]: UpgradeNg1ComponentAdapterBuilder} = {};\nprivate upgradedProviders: Provider[] = [];\nprivate ngZone: NgZone;\nprivate ng1Module: angular.IModule;\nprivate moduleRef: NgModuleRef|null = null;\nprivate ng2BootstrapDeferred: Deferred;\n/**\n * @param {?} ng2AppModule\n * @param {?=} compilerOptions\n */\nconstructor(private ng2AppModule: Type,\nprivate compilerOptions?: CompilerOptions) {\n if (!ng2AppModule) {\n throw new Error(\n 'UpgradeAdapter cannot be instantiated without an NgModule of the Angular app.');\n }\n }\n/**\n * Allows Angular Component to be used from AngularJS.\n * \n * Use `downgradeNg2Component` to create an AngularJS Directive Definition Factory from\n * Angular Component. The adapter will bootstrap Angular component from within the\n * AngularJS template.\n * \n * ## Mental Model\n * \n * 1. The component is instantiated by being listed in AngularJS template. This means that the\n * host element is controlled by AngularJS, but the component's view will be controlled by\n * Angular.\n * 2. Even thought the component is instantiated in AngularJS, it will be using Angular\n * syntax. This has to be done, this way because we must follow Angular components do not\n * declare how the attributes should be interpreted.\n * 3. `ng-model` is controlled by AngularJS and communicates with the downgraded Angular component\n * by way of the `ControlValueAccessor` interface from \\@angular/forms. Only components that\n * implement this interface are eligible.\n * \n * ## Supported Features\n * \n * - Bindings:\n * - Attribute: ``\n * - Interpolation: ``\n * - Expression: ``\n * - Event: ``\n * - ng-model: ``\n * - Content projection: yes\n * \n * ### Example\n * \n * ```\n * const adapter = new UpgradeAdapter(forwardRef(() => MyNg2Module));\n * const module = angular.module('myExample', []);\n * module.directive('greet', adapter.downgradeNg2Component(Greeter));\n * \n * \\@Component({ \n * selector: 'greet',\n * template: '{{salutation}} {{name}}! - '\n * })\n * class Greeter {\n * \\@Input() salutation: string;\n * \\@Input() name: string;\n * }\n * \n * \\@NgModule({ \n * declarations: [Greeter],\n * imports: [BrowserModule]\n * })\n * class MyNg2Module {}\n * \n * document.body.innerHTML =\n * 'ng1 template: text';\n * \n * adapter.bootstrap(document.body, ['myExample']).ready(function() {\n * expect(document.body.textContent).toEqual(\"ng1 template: Hello world! - text\");\n * });\n * ```\n * @param {?} component\n * @return {?}\n */\ndowngradeNg2Component(component: Type): Function {\n this.downgradedComponents.push(component);\n\n return downgradeComponent({component});\n }\n/**\n * Allows AngularJS Component to be used from Angular.\n * \n * Use `upgradeNg1Component` to create an Angular component from AngularJS Component\n * directive. The adapter will bootstrap AngularJS component from within the Angular\n * template.\n * \n * ## Mental Model\n * \n * 1. The component is instantiated by being listed in Angular template. This means that the\n * host element is controlled by Angular, but the component's view will be controlled by\n * AngularJS.\n * \n * ## Supported Features\n * \n * - Bindings:\n * - Attribute: ``\n * - Interpolation: ``\n * - Expression: ``\n * - Event: ``\n * - Transclusion: yes\n * - Only some of the features of\n * [Directive Definition Object](https://docs.angularjs.org/api/ng/service/$compile) are\n * supported:\n * - `compile`: not supported because the host element is owned by Angular, which does\n * not allow modifying DOM structure during compilation.\n * - `controller`: supported. (NOTE: injection of `$attrs` and `$transclude` is not supported.)\n * - `controllerAs`: supported.\n * - `bindToController`: supported.\n * - `link`: supported. (NOTE: only pre-link function is supported.)\n * - `name`: supported.\n * - `priority`: ignored.\n * - `replace`: not supported.\n * - `require`: supported.\n * - `restrict`: must be set to 'E'.\n * - `scope`: supported.\n * - `template`: supported.\n * - `templateUrl`: supported.\n * - `terminal`: ignored.\n * - `transclude`: supported.\n * \n * \n * ### Example\n * \n * ```\n * const adapter = new UpgradeAdapter(forwardRef(() => MyNg2Module));\n * const module = angular.module('myExample', []);\n * \n * module.directive('greet', function() {\n * return {\n * scope: {salutation: '=', name: '=' },\n * template: '{{salutation}} {{name}}! - '\n * };\n * });\n * \n * module.directive('ng2', adapter.downgradeNg2Component(Ng2Component));\n * \n * \\@Component({ \n * selector: 'ng2',\n * template: 'ng2 template: text'\n * })\n * class Ng2Component {\n * }\n * \n * \\@NgModule({ \n * declarations: [Ng2Component, adapter.upgradeNg1Component('greet')],\n * imports: [BrowserModule]\n * })\n * class MyNg2Module {}\n * \n * document.body.innerHTML = '';\n * \n * adapter.bootstrap(document.body, ['myExample']).ready(function() {\n * expect(document.body.textContent).toEqual(\"ng2 template: Hello world! - text\");\n * });\n * ```\n * @param {?} name\n * @return {?}\n */\nupgradeNg1Component(name: string): Type {\n if (( /** @type {?} */((this.ng1ComponentsToBeUpgraded))).hasOwnProperty(name)) {\n return this.ng1ComponentsToBeUpgraded[name].type;\n } else {\n return (this.ng1ComponentsToBeUpgraded[name] = new UpgradeNg1ComponentAdapterBuilder(name))\n .type;\n }\n }\n/**\n * Registers the adapter's AngularJS upgrade module for unit testing in AngularJS.\n * Use this instead of `angular.mock.module()` to load the upgrade module into\n * the AngularJS testing injector.\n * \n * ### Example\n * \n * ```\n * const upgradeAdapter = new UpgradeAdapter(MyNg2Module);\n * \n * // configure the adapter with upgrade/downgrade components and services\n * upgradeAdapter.downgradeNg2Component(MyComponent);\n * \n * let upgradeAdapterRef: UpgradeAdapterRef;\n * let $compile, $rootScope;\n * \n * // We must register the adapter before any calls to `inject()`\n * beforeEach(() => {\n * upgradeAdapterRef = upgradeAdapter.registerForNg1Tests(['heroApp']);\n * });\n * \n * beforeEach(inject((_$compile_, _$rootScope_) => {\n * $compile = _$compile_;\n * $rootScope = _$rootScope_;\n * }));\n * \n * it(\"says hello\", (done) => {\n * upgradeAdapterRef.ready(() => {\n * const element = $compile(\"\")($rootScope);\n * $rootScope.$apply();\n * expect(element.html()).toContain(\"Hello World\");\n * done();\n * })\n * });\n * \n * ```\n * \n * @param {?=} modules any AngularJS modules that the upgrade module should depend upon\n * @return {?} an {\\@link UpgradeAdapterRef}, which lets you register a `ready()` callback to\n * run assertions once the Angular components are ready to test through AngularJS.\n */\nregisterForNg1Tests(modules?: string[]): UpgradeAdapterRef {\n const /** @type {?} */ windowNgMock = ( /** @type {?} */((window as any)))['angular'].mock;\n if (!windowNgMock || !windowNgMock.module) {\n throw new Error('Failed to find \\'angular.mock.module\\'.');\n }\n this.declareNg1Module(modules);\n windowNgMock.module(this.ng1Module.name);\n const /** @type {?} */ upgrade = new UpgradeAdapterRef();\n this.ng2BootstrapDeferred.promise.then(\n (ng1Injector) => { ( /** @type {?} */((upgrade)))._bootstrapDone(this.moduleRef, ng1Injector); }, onError);\n return upgrade;\n }\n/**\n * Bootstrap a hybrid AngularJS / Angular application.\n * \n * This `bootstrap` method is a direct replacement (takes same arguments) for AngularJS\n * [`bootstrap`](https://docs.angularjs.org/api/ng/function/angular.bootstrap) method. Unlike\n * AngularJS, this bootstrap is asynchronous.\n * \n * ### Example\n * \n * ```\n * const adapter = new UpgradeAdapter(MyNg2Module);\n * const module = angular.module('myExample', []);\n * module.directive('ng2', adapter.downgradeNg2Component(Ng2));\n * \n * module.directive('ng1', function() {\n * return {\n * scope: { title: '=' },\n * template: 'ng1[Hello {{title}}!]()'\n * };\n * });\n * \n * \n * \\@Component({ \n * selector: 'ng2',\n * inputs: ['name'],\n * template: 'ng2[transclude]()'\n * })\n * class Ng2 {\n * }\n * \n * \\@NgModule({ \n * declarations: [Ng2, adapter.upgradeNg1Component('ng1')],\n * imports: [BrowserModule]\n * })\n * class MyNg2Module {}\n * \n * document.body.innerHTML = 'project';\n * \n * adapter.bootstrap(document.body, ['myExample']).ready(function() {\n * expect(document.body.textContent).toEqual(\n * \"ng2[ng1[Hello World!](transclude)](project)\");\n * });\n * ```\n * @param {?} element\n * @param {?=} modules\n * @param {?=} config\n * @return {?}\n */\nbootstrap(element: Element, modules?: any[], config?: angular.IAngularBootstrapConfig):\n UpgradeAdapterRef {\n this.declareNg1Module(modules);\n\n const /** @type {?} */ upgrade = new UpgradeAdapterRef();\n\n // Make sure resumeBootstrap() only exists if the current bootstrap is deferred\n const /** @type {?} */ windowAngular = ( /** @type {?} */((window as any)) /** TODO #???? */)['angular'];\n windowAngular.resumeBootstrap = undefined;\n\n this.ngZone.run(() => { angular.bootstrap(element, [this.ng1Module.name], /** @type {?} */(( config))); });\n const /** @type {?} */ ng1BootstrapPromise = new Promise((resolve) => {\n if (windowAngular.resumeBootstrap) {\n const /** @type {?} */ originalResumeBootstrap: () => void = windowAngular.resumeBootstrap;\n windowAngular.resumeBootstrap = function() {\n windowAngular.resumeBootstrap = originalResumeBootstrap;\n windowAngular.resumeBootstrap.apply(this, arguments);\n resolve();\n };\n } else {\n resolve();\n }\n });\n\n Promise.all([this.ng2BootstrapDeferred.promise, ng1BootstrapPromise]).then(([ng1Injector]) => { /** @type {?} */((\n angular.element(element).data))(controllerKey(INJECTOR_KEY), /** @type {?} */(( this.moduleRef)).injector); /** @type {?} */((\n this.moduleRef)).injector.get(NgZone).run(\n () => { ( /** @type {?} */((upgrade)))._bootstrapDone(this.moduleRef, ng1Injector); });\n }, onError);\n return upgrade;\n }\n/**\n * Allows AngularJS service to be accessible from Angular.\n * \n * \n * ### Example\n * \n * ```\n * class Login { ... }\n * class Server { ... }\n * \n * \\@Injectable() \n * class Example {\n * constructor(\\@Inject('server') server, login: Login) {\n * ...\n * }\n * }\n * \n * const module = angular.module('myExample', []);\n * module.service('server', Server);\n * module.service('login', Login);\n * \n * const adapter = new UpgradeAdapter(MyNg2Module);\n * adapter.upgradeNg1Provider('server');\n * adapter.upgradeNg1Provider('login', {asToken: Login});\n * \n * adapter.bootstrap(document.body, ['myExample']).ready((ref) => {\n * const example: Example = ref.ng2Injector.get(Example);\n * });\n * \n * ```\n * @param {?} name\n * @param {?=} options\n * @return {?}\n */\nupgradeNg1Provider(name: string, options?: {asToken: any}) {\n const /** @type {?} */ token = options && options.asToken || name;\n this.upgradedProviders.push({\n provide: token,\n useFactory: ($injector: angular.IInjectorService) => $injector.get(name),\n deps: [$INJECTOR]\n });\n }\n/**\n * Allows Angular service to be accessible from AngularJS.\n * \n * \n * ### Example\n * \n * ```\n * class Example {\n * }\n * \n * const adapter = new UpgradeAdapter(MyNg2Module);\n * \n * const module = angular.module('myExample', []);\n * module.factory('example', adapter.downgradeNg2Provider(Example));\n * \n * adapter.bootstrap(document.body, ['myExample']).ready((ref) => {\n * const example: Example = ref.ng1Injector.get('example');\n * });\n * \n * ```\n * @param {?} token\n * @return {?}\n */\ndowngradeNg2Provider(token: any): Function { return downgradeInjectable(token); }\n/**\n * Declare the AngularJS upgrade module for this adapter without bootstrapping the whole\n * hybrid application.\n * \n * This method is automatically called by `bootstrap()` and `registerForNg1Tests()`.\n * \n * @param {?=} modules The AngularJS modules that this upgrade module should depend upon.\n * @return {?} The AngularJS upgrade module that is declared by this method\n * \n * ### Example\n * \n * ```\n * const upgradeAdapter = new UpgradeAdapter(MyNg2Module);\n * upgradeAdapter.declareNg1Module(['heroApp']);\n * ```\n */\nprivate declareNg1Module(modules: string[] = []): angular.IModule {\n const /** @type {?} */ delayApplyExps: Function[] = [];\n let /** @type {?} */ original$applyFn: Function;\n let /** @type {?} */ rootScopePrototype: any;\n let /** @type {?} */ rootScope: angular.IRootScopeService;\n const /** @type {?} */ upgradeAdapter = this;\n const /** @type {?} */ ng1Module = this.ng1Module = angular.module(this.idPrefix, modules);\n const /** @type {?} */ platformRef = platformBrowserDynamic();\n\n this.ngZone = new NgZone({enableLongStackTrace: Zone.hasOwnProperty('longStackTraceZoneSpec')});\n this.ng2BootstrapDeferred = new Deferred();\n ng1Module.factory(INJECTOR_KEY, () => /** @type {?} */(( this.moduleRef)).injector.get(Injector))\n .constant(NG_ZONE_KEY, this.ngZone)\n .factory(COMPILER_KEY, () => /** @type {?} */(( this.moduleRef)).injector.get(Compiler))\n .config([\n '$provide', '$injector',\n (provide: angular.IProvideService, ng1Injector: angular.IInjectorService) => {\n provide.decorator($ROOT_SCOPE, [\n '$delegate',\n function(rootScopeDelegate: angular.IRootScopeService) {\n // Capture the root apply so that we can delay first call to $apply until we\n // bootstrap Angular and then we replay and restore the $apply.\n rootScopePrototype = rootScopeDelegate.constructor.prototype;\n if (rootScopePrototype.hasOwnProperty('$apply')) {\n original$applyFn = rootScopePrototype.$apply;\n rootScopePrototype.$apply = (exp: any) => delayApplyExps.push(exp);\n } else {\n throw new Error('Failed to find \\'$apply\\' on \\'$rootScope\\'!');\n }\n return rootScope = rootScopeDelegate;\n }\n ]);\n if (ng1Injector.has($$TESTABILITY)) {\n provide.decorator($$TESTABILITY, [\n '$delegate',\n function(testabilityDelegate: angular.ITestabilityService) {\n const /** @type {?} */ originalWhenStable: Function = testabilityDelegate.whenStable;\n // Cannot use arrow function below because we need the context\n const /** @type {?} */ newWhenStable = function(callback: Function) {\n originalWhenStable.call(this, function() {\n const /** @type {?} */ ng2Testability: Testability = /** @type {?} */((\n upgradeAdapter.moduleRef)).injector.get(Testability);\n if (ng2Testability.isStable()) {\n callback.apply(this, arguments);\n } else {\n ng2Testability.whenStable(newWhenStable.bind(this, callback));\n }\n });\n };\n\n testabilityDelegate.whenStable = newWhenStable;\n return testabilityDelegate;\n }\n ]);\n }\n }\n ]);\n\n ng1Module.run([\n '$injector', '$rootScope',\n (ng1Injector: angular.IInjectorService, rootScope: angular.IRootScopeService) => {\n UpgradeNg1ComponentAdapterBuilder.resolve(this.ng1ComponentsToBeUpgraded, ng1Injector)\n .then(() => {\n // At this point we have ng1 injector and we have prepared\n // ng1 components to be upgraded, we now can bootstrap ng2.\n const /** @type {?} */ DynamicNgUpgradeModule =\n NgModule({\n providers: [\n {provide: $INJECTOR, useFactory: () => ng1Injector},\n {provide: $COMPILE, useFactory: () => ng1Injector.get($COMPILE)},\n this.upgradedProviders\n ],\n imports: [this.ng2AppModule],\n entryComponents: this.downgradedComponents\n }).Class({\n constructor: function DynamicNgUpgradeModule() {},\n ngDoBootstrap: function() {}\n });\n ( /** @type {?} */((platformRef as any)))\n ._bootstrapModuleWithZone(\n DynamicNgUpgradeModule, this.compilerOptions, this.ngZone)\n .then((ref: NgModuleRef) => {\n this.moduleRef = ref;\n this.ngZone.run(() => {\n if (rootScopePrototype) {\n rootScopePrototype.$apply = original$applyFn; // restore original $apply\n while (delayApplyExps.length) {\n rootScope.$apply(delayApplyExps.shift());\n }\n rootScopePrototype = null;\n }\n });\n })\n .then(() => this.ng2BootstrapDeferred.resolve(ng1Injector), onError)\n .then(() => {\n let /** @type {?} */ subscription =\n this.ngZone.onMicrotaskEmpty.subscribe({next: () => rootScope.$digest()});\n rootScope.$on('$destroy', () => { subscription.unsubscribe(); });\n });\n })\n .catch((e) => this.ng2BootstrapDeferred.reject(e));\n }\n ]);\n\n return ng1Module;\n }\n}\n\nfunction UpgradeAdapter_tsickle_Closure_declarations() {\n/** @type {?} */\nUpgradeAdapter.prototype.idPrefix;\n/** @type {?} */\nUpgradeAdapter.prototype.downgradedComponents;\n/**\n * An internal map of ng1 components which need to up upgraded to ng2.\n * \n * We can't upgrade until injector is instantiated and we can retrieve the component metadata.\n * For this reason we keep a list of components to upgrade until ng1 injector is bootstrapped.\n * \n * \\@internal\n * @type {?}\n */\nUpgradeAdapter.prototype.ng1ComponentsToBeUpgraded;\n/** @type {?} */\nUpgradeAdapter.prototype.upgradedProviders;\n/** @type {?} */\nUpgradeAdapter.prototype.ngZone;\n/** @type {?} */\nUpgradeAdapter.prototype.ng1Module;\n/** @type {?} */\nUpgradeAdapter.prototype.moduleRef;\n/** @type {?} */\nUpgradeAdapter.prototype.ng2BootstrapDeferred;\n/** @type {?} */\nUpgradeAdapter.prototype.ng2AppModule;\n/** @type {?} */\nUpgradeAdapter.prototype.compilerOptions;\n}\n\n/**\n * Synchronous promise-like object to wrap parent injectors,\n * to preserve the synchronous nature of AngularJS's $compile.\n */\nclass ParentInjectorPromise {\nprivate injector: Injector;\nprivate callbacks: ((injector: Injector) => any)[] = [];\n/**\n * @param {?} element\n */\nconstructor(private element: angular.IAugmentedJQuery) {\n // store the promise on the element\n element.data !(controllerKey(INJECTOR_KEY), this);\n }\n/**\n * @param {?} callback\n * @return {?}\n */\nthen(callback: (injector: Injector) => any) {\n if (this.injector) {\n callback(this.injector);\n } else {\n this.callbacks.push(callback);\n }\n }\n/**\n * @param {?} injector\n * @return {?}\n */\nresolve(injector: Injector) {\n this.injector = injector; /** @type {?} */((\n\n // reset the element data to point to the real injector\n this.element.data))(controllerKey(INJECTOR_KEY), injector);\n\n // clean out the element to prevent memory leaks\n this.element = /** @type {?} */(( null));\n\n // run all the queued callbacks\n this.callbacks.forEach((callback) => callback(injector));\n this.callbacks.length = 0;\n }\n}\n\nfunction ParentInjectorPromise_tsickle_Closure_declarations() {\n/** @type {?} */\nParentInjectorPromise.prototype.injector;\n/** @type {?} */\nParentInjectorPromise.prototype.callbacks;\n/** @type {?} */\nParentInjectorPromise.prototype.element;\n}\n\n/**\n * Use `UpgradeAdapterRef` to control a hybrid AngularJS / Angular application.\n * \n * \\@stable\n */\nexport class UpgradeAdapterRef {\nprivate _readyFn: ((upgradeAdapterRef?: UpgradeAdapterRef) => void)|null = null;\npublic ng1RootScope: angular.IRootScopeService = /** @type {?} */(( null));\npublic ng1Injector: angular.IInjectorService = /** @type {?} */(( null));\npublic ng2ModuleRef: NgModuleRef = /** @type {?} */(( null));\npublic ng2Injector: Injector = /** @type {?} */(( null));\n/**\n * @param {?} ngModuleRef\n * @param {?} ng1Injector\n * @return {?}\n */\nprivate _bootstrapDone(ngModuleRef: NgModuleRef, ng1Injector: angular.IInjectorService) {\n this.ng2ModuleRef = ngModuleRef;\n this.ng2Injector = ngModuleRef.injector;\n this.ng1Injector = ng1Injector;\n this.ng1RootScope = ng1Injector.get($ROOT_SCOPE);\n this._readyFn && this._readyFn(this);\n }\n/**\n * Register a callback function which is notified upon successful hybrid AngularJS / Angular\n * application has been bootstrapped.\n * \n * The `ready` callback function is invoked inside the Angular zone, therefore it does not\n * require a call to `$apply()`.\n * @param {?} fn\n * @return {?}\n */\npublic ready(fn: (upgradeAdapterRef: UpgradeAdapterRef) => void) { this._readyFn = fn; }\n/**\n * Dispose of running hybrid AngularJS / Angular application.\n * @return {?}\n */\npublic dispose() { /** @type {?} */((\n this.ng1Injector)).get($ROOT_SCOPE).$destroy(); /** @type {?} */((\n this.ng2ModuleRef)).destroy();\n }\n}\n\nfunction UpgradeAdapterRef_tsickle_Closure_declarations() {\n/** @type {?} */\nUpgradeAdapterRef.prototype._readyFn;\n/** @type {?} */\nUpgradeAdapterRef.prototype.ng1RootScope;\n/** @type {?} */\nUpgradeAdapterRef.prototype.ng1Injector;\n/** @type {?} */\nUpgradeAdapterRef.prototype.ng2ModuleRef;\n/** @type {?} */\nUpgradeAdapterRef.prototype.ng2Injector;\n}\n\n","/**\n * @license\n * Copyright Google Inc. 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 upgrade/dynamic package, allowing\n * Angular 1 and Angular 2+ to run side by side in the same application.\n */\nexport {VERSION} from './src/common/version';\nexport {UpgradeAdapter, UpgradeAdapterRef} from './src/dynamic/upgrade_adapter';\n\n// This file only re-exports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. 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\nimport {Directive, DoCheck, ElementRef, EventEmitter, Inject, Injector, OnChanges, OnInit, SimpleChange, SimpleChanges, Type} from '@angular/core';\n\nimport * as angular from '../common/angular1';\nimport {$SCOPE} from '../common/constants';\nimport {IBindingDestination, IControllerInstance, UpgradeHelper} from '../common/upgrade_helper';\nimport {isFunction, strictEquals} from '../common/util';\n\n\nconst /** @type {?} */ CAMEL_CASE = /([A-Z])/g;\nconst /** @type {?} */ INITIAL_VALUE = {\n __UNINITIALIZED__: true\n};\nconst /** @type {?} */ NOT_SUPPORTED: any = 'NOT_SUPPORTED';\nexport class UpgradeNg1ComponentAdapterBuilder {\n type: Type;\n inputs: string[] = [];\n inputsRename: string[] = [];\n outputs: string[] = [];\n outputsRename: string[] = [];\n propertyOutputs: string[] = [];\n checkProperties: string[] = [];\n propertyMap: {[name: string]: string} = {};\n directive: angular.IDirective|null = null;\n template: string;\n/**\n * @param {?} name\n */\nconstructor(public name: string) {\n const selector =\n name.replace(CAMEL_CASE, (all: string, next: string) => '-' + next.toLowerCase());\n const self = this;\n\n this.type =\n Directive({selector: selector, inputs: this.inputsRename, outputs: this.outputsRename})\n .Class({\n constructor: [\n new Inject($SCOPE), Injector, ElementRef,\n function(scope: angular.IScope, injector: Injector, elementRef: ElementRef) {\n const helper = new UpgradeHelper(injector, name, elementRef, this.directive);\n return new UpgradeNg1ComponentAdapter(\n helper, scope, self.template, self.inputs, self.outputs, self.propertyOutputs,\n self.checkProperties, self.propertyMap);\n }\n ],\n ngOnInit: function() { /* needs to be here for ng2 to properly detect it */ },\n ngOnChanges: function() { /* needs to be here for ng2 to properly detect it */ },\n ngDoCheck: function() { /* needs to be here for ng2 to properly detect it */ },\n ngOnDestroy: function() { /* needs to be here for ng2 to properly detect it */ },\n });\n }\n/**\n * @return {?}\n */\nextractBindings() {\n const /** @type {?} */ btcIsObject = typeof /** @type {?} */(( this.directive)).bindToController === 'object';\n if (btcIsObject && Object.keys( /** @type {?} */((this.directive)).scope).length) {\n throw new Error(\n `Binding definitions on scope and controller at the same time are not supported.`);\n }\n\n const /** @type {?} */ context = (btcIsObject) ? /** @type {?} */(( this.directive)).bindToController : /** @type {?} */(( this.directive)).scope;\n\n if (typeof context == 'object') {\n Object.keys(context).forEach(propName => {\n const /** @type {?} */ definition = context[propName];\n const /** @type {?} */ bindingType = definition.charAt(0);\n const /** @type {?} */ bindingOptions = definition.charAt(1);\n const /** @type {?} */ attrName = definition.substring(bindingOptions === '?' ? 2 : 1) || propName;\n\n // QUESTION: What about `=*`? Ignore? Throw? Support?\n\n const /** @type {?} */ inputName = `input_${attrName}`;\n const /** @type {?} */ inputNameRename = `${inputName}: ${attrName}`;\n const /** @type {?} */ outputName = `output_${attrName}`;\n const /** @type {?} */ outputNameRename = `${outputName}: ${attrName}`;\n const /** @type {?} */ outputNameRenameChange = `${outputNameRename}Change`;\n\n switch (bindingType) {\n case '@':\n case '<':\n this.inputs.push(inputName);\n this.inputsRename.push(inputNameRename);\n this.propertyMap[inputName] = propName;\n break;\n case '=':\n this.inputs.push(inputName);\n this.inputsRename.push(inputNameRename);\n this.propertyMap[inputName] = propName;\n\n this.outputs.push(outputName);\n this.outputsRename.push(outputNameRenameChange);\n this.propertyMap[outputName] = propName;\n\n this.checkProperties.push(propName);\n this.propertyOutputs.push(outputName);\n break;\n case '&':\n this.outputs.push(outputName);\n this.outputsRename.push(outputNameRename);\n this.propertyMap[outputName] = propName;\n break;\n default:\n let /** @type {?} */ json = JSON.stringify(context);\n throw new Error(\n `Unexpected mapping '${bindingType}' in '${json}' in '${this.name}' directive.`);\n }\n });\n }\n }\n/**\n * Upgrade ng1 components into Angular.\n * @param {?} exportedComponents\n * @param {?} $injector\n * @return {?}\n */\nstatic resolve(\n exportedComponents: {[name: string]: UpgradeNg1ComponentAdapterBuilder},\n $injector: angular.IInjectorService): Promise {\n const /** @type {?} */ promises = Object.keys(exportedComponents).map(name => {\n const /** @type {?} */ exportedComponent = exportedComponents[name];\n exportedComponent.directive = UpgradeHelper.getDirective($injector, name);\n exportedComponent.extractBindings();\n\n return Promise\n .resolve(UpgradeHelper.getTemplate($injector, exportedComponent.directive, true))\n .then(template => exportedComponent.template = template);\n });\n\n return Promise.all(promises);\n }\n}\n\nfunction UpgradeNg1ComponentAdapterBuilder_tsickle_Closure_declarations() {\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.type;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.inputs;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.inputsRename;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.outputs;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.outputsRename;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.propertyOutputs;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.checkProperties;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.propertyMap;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.directive;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.template;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.name;\n}\n\nclass UpgradeNg1ComponentAdapter implements OnInit, OnChanges, DoCheck {\nprivate controllerInstance: IControllerInstance|null = null;\n destinationObj: IBindingDestination|null = null;\n checkLastValues: any[] = [];\nprivate directive: angular.IDirective;\n element: Element;\n $element: any = null;\n componentScope: angular.IScope;\n/**\n * @param {?} helper\n * @param {?} scope\n * @param {?} template\n * @param {?} inputs\n * @param {?} outputs\n * @param {?} propOuts\n * @param {?} checkProperties\n * @param {?} propertyMap\n */\nconstructor(\nprivate helper: UpgradeHelper, scope: angular.IScope,\nprivate template: string,\nprivate inputs: string[],\nprivate outputs: string[],\nprivate propOuts: string[],\nprivate checkProperties: string[],\nprivate propertyMap: {[key: string]: string}) {\n this.directive = helper.directive;\n this.element = helper.element;\n this.$element = helper.$element;\n this.componentScope = scope.$new(!!this.directive.scope);\n\n const controllerType = this.directive.controller;\n\n if (this.directive.bindToController && controllerType) {\n this.controllerInstance = this.helper.buildController(controllerType, this.componentScope);\n this.destinationObj = this.controllerInstance;\n } else {\n this.destinationObj = this.componentScope;\n }\n\n for (let i = 0; i < inputs.length; i++) {\n (this as any)[inputs[i]] = null;\n }\n for (let j = 0; j < outputs.length; j++) {\n const emitter = (this as any)[outputs[j]] = new EventEmitter();\n this.setComponentProperty(\n outputs[j], (emitter => (value: any) => emitter.emit(value))(emitter));\n }\n for (let k = 0; k < propOuts.length; k++) {\n this.checkLastValues.push(INITIAL_VALUE);\n }\n }\n/**\n * @return {?}\n */\nngOnInit() {\n // Collect contents, insert and compile template\n const /** @type {?} */ attachChildNodes: angular.ILinkFn|undefined = this.helper.prepareTransclusion();\n const /** @type {?} */ linkFn = this.helper.compileTemplate(this.template);\n\n // Instantiate controller (if not already done so)\n const /** @type {?} */ controllerType = this.directive.controller;\n const /** @type {?} */ bindToController = this.directive.bindToController;\n if (controllerType && !bindToController) {\n this.controllerInstance = this.helper.buildController(controllerType, this.componentScope);\n }\n\n // Require other controllers\n const /** @type {?} */ requiredControllers =\n this.helper.resolveAndBindRequiredControllers(this.controllerInstance);\n\n // Hook: $onInit\n if (this.controllerInstance && isFunction(this.controllerInstance.$onInit)) {\n this.controllerInstance.$onInit();\n }\n\n // Linking\n const /** @type {?} */ link = this.directive.link;\n const /** @type {?} */ preLink = (typeof link == 'object') && ( /** @type {?} */((link as angular.IDirectivePrePost))).pre;\n const /** @type {?} */ postLink = (typeof link == 'object') ? ( /** @type {?} */((link as angular.IDirectivePrePost))).post : link;\n const /** @type {?} */ attrs: angular.IAttributes = NOT_SUPPORTED;\n const /** @type {?} */ transcludeFn: angular.ITranscludeFunction = NOT_SUPPORTED;\n if (preLink) {\n preLink(this.componentScope, this.$element, attrs, requiredControllers, transcludeFn);\n }\n\n linkFn(this.componentScope, /** @type {?} */(( null)), {parentBoundTranscludeFn: attachChildNodes});\n\n if (postLink) {\n postLink(this.componentScope, this.$element, attrs, requiredControllers, transcludeFn);\n }\n\n // Hook: $postLink\n if (this.controllerInstance && isFunction(this.controllerInstance.$postLink)) {\n this.controllerInstance.$postLink();\n }\n }\n/**\n * @param {?} changes\n * @return {?}\n */\nngOnChanges(changes: SimpleChanges) {\n const /** @type {?} */ ng1Changes: any = {};\n Object.keys(changes).forEach(name => {\n const /** @type {?} */ change: SimpleChange = changes[name];\n this.setComponentProperty(name, change.currentValue);\n ng1Changes[this.propertyMap[name]] = change;\n });\n\n if (isFunction( /** @type {?} */((this.destinationObj)).$onChanges)) { /** @type {?} */(( /** @type {?} */((\n this.destinationObj)).$onChanges))(ng1Changes);\n }\n }\n/**\n * @return {?}\n */\nngDoCheck() {\n const /** @type {?} */ destinationObj = this.destinationObj;\n const /** @type {?} */ lastValues = this.checkLastValues;\n const /** @type {?} */ checkProperties = this.checkProperties;\n const /** @type {?} */ propOuts = this.propOuts;\n checkProperties.forEach((propName, i) => {\n const /** @type {?} */ value = /** @type {?} */(( destinationObj))[propName];\n const /** @type {?} */ last = lastValues[i];\n if (!strictEquals(last, value)) {\n const /** @type {?} */ eventEmitter: EventEmitter = ( /** @type {?} */((this as any)))[propOuts[i]];\n eventEmitter.emit(lastValues[i] = value);\n }\n });\n\n if (this.controllerInstance && isFunction(this.controllerInstance.$doCheck)) {\n this.controllerInstance.$doCheck();\n }\n }\n/**\n * @return {?}\n */\nngOnDestroy() {\n if (this.controllerInstance && isFunction(this.controllerInstance.$onDestroy)) {\n this.controllerInstance.$onDestroy();\n }\n }\n/**\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\nsetComponentProperty(name: string, value: any) { /** @type {?} */((\n this.destinationObj))[this.propertyMap[name]] = value;\n }\n}\n\nfunction UpgradeNg1ComponentAdapter_tsickle_Closure_declarations() {\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.controllerInstance;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.destinationObj;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.checkLastValues;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.directive;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.element;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.$element;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.componentScope;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.helper;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.template;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.inputs;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.outputs;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.propOuts;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.checkProperties;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.propertyMap;\n}\n\n","/**\n * @license\n * Copyright Google Inc. 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\nimport {ElementRef, Injector, SimpleChanges} from '@angular/core';\n\nimport * as angular from './angular1';\nimport {$COMPILE, $CONTROLLER, $HTTP_BACKEND, $INJECTOR, $TEMPLATE_CACHE} from './constants';\nimport {controllerKey, directiveNormalize, isFunction} from './util';\n\n\n// Constants\nconst /** @type {?} */ REQUIRE_PREFIX_RE = /^(\\^\\^?)?(\\?)?(\\^\\^?)?/;\n\n// Interfaces\nexport interface IBindingDestination {\n [key: string]: any;\n $onChanges?: (changes: SimpleChanges) => void;\n}\n\nexport interface IControllerInstance extends IBindingDestination {\n $doCheck?: () => void;\n $onDestroy?: () => void;\n $onInit?: () => void;\n $postLink?: () => void;\n}\nexport class UpgradeHelper {\npublic readonly $injector: angular.IInjectorService;\npublic readonly element: Element;\npublic readonly $element: angular.IAugmentedJQuery;\npublic readonly directive: angular.IDirective;\nprivate readonly $compile: angular.ICompileService;\nprivate readonly $controller: angular.IControllerService;\n/**\n * @param {?} injector\n * @param {?} name\n * @param {?} elementRef\n * @param {?=} directive\n */\nconstructor(\nprivate injector: Injector,\nprivate name: string, elementRef: ElementRef,\n directive?: angular.IDirective) {\n this.$injector = injector.get($INJECTOR);\n this.$compile = this.$injector.get($COMPILE);\n this.$controller = this.$injector.get($CONTROLLER);\n\n this.element = elementRef.nativeElement;\n this.$element = angular.element(this.element);\n\n this.directive = directive || UpgradeHelper.getDirective(this.$injector, name);\n }\n/**\n * @param {?} $injector\n * @param {?} name\n * @return {?}\n */\nstatic getDirective($injector: angular.IInjectorService, name: string): angular.IDirective {\n const /** @type {?} */ directives: angular.IDirective[] = $injector.get(name + 'Directive');\n if (directives.length > 1) {\n throw new Error(`Only support single directive definition for: ${name}`);\n }\n\n const /** @type {?} */ directive = directives[0];\n\n // AngularJS will transform `link: xyz` to `compile: () => xyz`. So we can only tell there was a\n // user-defined `compile` if there is no `link`. In other cases, we will just ignore `compile`.\n if (directive.compile && !directive.link) notSupported(name, 'compile');\n if (directive.replace) notSupported(name, 'replace');\n if (directive.terminal) notSupported(name, 'terminal');\n\n return directive;\n }\n/**\n * @param {?} $injector\n * @param {?} directive\n * @param {?=} fetchRemoteTemplate\n * @return {?}\n */\nstatic getTemplate(\n $injector: angular.IInjectorService, directive: angular.IDirective,\n fetchRemoteTemplate = false): string|Promise {\n if (directive.template !== undefined) {\n return getOrCall(directive.template);\n } else if (directive.templateUrl) {\n const /** @type {?} */ $templateCache = /** @type {?} */(( $injector.get($TEMPLATE_CACHE) as angular.ITemplateCacheService));\n const /** @type {?} */ url = getOrCall(directive.templateUrl);\n const /** @type {?} */ template = $templateCache.get(url);\n\n if (template !== undefined) {\n return template;\n } else if (!fetchRemoteTemplate) {\n throw new Error('loading directive templates asynchronously is not supported');\n }\n\n return new Promise((resolve, reject) => {\n const /** @type {?} */ $httpBackend = /** @type {?} */(( $injector.get($HTTP_BACKEND) as angular.IHttpBackendService));\n $httpBackend('GET', url, null, (status: number, response: string) => {\n if (status === 200) {\n resolve($templateCache.put(url, response));\n } else {\n reject(`GET component template from '${url}' returned '${status}: ${response}'`);\n }\n });\n });\n } else {\n throw new Error(`Directive '${directive.name}' is not a component, it is missing template.`);\n }\n }\n/**\n * @param {?} controllerType\n * @param {?} $scope\n * @return {?}\n */\nbuildController(controllerType: angular.IController, $scope: angular.IScope) {\n // TODO: Document that we do not pre-assign bindings on the controller instance.\n // Quoted properties below so that this code can be optimized with Closure Compiler.\n const /** @type {?} */ locals = {'$scope': $scope, '$element': this.$element};\n const /** @type {?} */ controller = this.$controller(controllerType, locals, null, this.directive.controllerAs); /** @type {?} */((\n\n this.$element.data))(controllerKey( /** @type {?} */((this.directive.name))), controller);\n\n return controller;\n }\n/**\n * @param {?=} template\n * @return {?}\n */\ncompileTemplate(template?: string): angular.ILinkFn {\n if (template === undefined) {\n template = /** @type {?} */(( UpgradeHelper.getTemplate(this.$injector, this.directive) as string));\n }\n\n return this.compileHtml(template);\n }\n/**\n * @return {?}\n */\nprepareTransclusion(): angular.ILinkFn|undefined {\n const /** @type {?} */ transclude = this.directive.transclude;\n const /** @type {?} */ contentChildNodes = this.extractChildNodes();\n let /** @type {?} */ $template = contentChildNodes;\n let /** @type {?} */ attachChildrenFn: angular.ILinkFn|undefined = (scope, cloneAttach) => /** @type {?} */((\n cloneAttach))($template, scope);\n\n if (transclude) {\n const /** @type {?} */ slots = Object.create(null);\n\n if (typeof transclude === 'object') {\n $template = [];\n\n const /** @type {?} */ slotMap = Object.create(null);\n const /** @type {?} */ filledSlots = Object.create(null);\n\n // Parse the element selectors.\n Object.keys(transclude).forEach(slotName => {\n let /** @type {?} */ selector = transclude[slotName];\n const /** @type {?} */ optional = selector.charAt(0) === '?';\n selector = optional ? selector.substring(1) : selector;\n\n slotMap[selector] = slotName;\n slots[slotName] = null; // `null`: Defined but not yet filled.\n filledSlots[slotName] = optional; // Consider optional slots as filled.\n });\n\n // Add the matching elements into their slot.\n contentChildNodes.forEach(node => {\n const /** @type {?} */ slotName = slotMap[directiveNormalize(node.nodeName.toLowerCase())];\n if (slotName) {\n filledSlots[slotName] = true;\n slots[slotName] = slots[slotName] || [];\n slots[slotName].push(node);\n } else {\n $template.push(node);\n }\n });\n\n // Check for required slots that were not filled.\n Object.keys(filledSlots).forEach(slotName => {\n if (!filledSlots[slotName]) {\n throw new Error(`Required transclusion slot '${slotName}' on directive: ${this.name}`);\n }\n });\n\n Object.keys(slots).filter(slotName => slots[slotName]).forEach(slotName => {\n const /** @type {?} */ nodes = slots[slotName];\n slots[slotName] = (scope: angular.IScope, cloneAttach: angular.ICloneAttachFunction) => /** @type {?} */((\n cloneAttach))(nodes, scope);\n });\n }\n\n // Attach `$$slots` to default slot transclude fn.\n attachChildrenFn.$$slots = slots;\n\n // AngularJS v1.6+ ignores empty or whitespace-only transcluded text nodes. But Angular\n // removes all text content after the first interpolation and updates it later, after\n // evaluating the expressions. This would result in AngularJS failing to recognize text\n // nodes that start with an interpolation as transcluded content and use the fallback\n // content instead.\n // To avoid this issue, we add a\n // [zero-width non-joiner character](https://en.wikipedia.org/wiki/Zero-width_non-joiner)\n // to empty text nodes (which can only be a result of Angular removing their initial content).\n // NOTE: Transcluded text content that starts with whitespace followed by an interpolation\n // will still fail to be detected by AngularJS v1.6+\n $template.forEach(node => {\n if (node.nodeType === Node.TEXT_NODE && !node.nodeValue) {\n node.nodeValue = '\\u200C';\n }\n });\n }\n\n return attachChildrenFn;\n }\n/**\n * @param {?} controllerInstance\n * @return {?}\n */\nresolveAndBindRequiredControllers(controllerInstance: IControllerInstance|null) {\n const /** @type {?} */ directiveRequire = this.getDirectiveRequire();\n const /** @type {?} */ requiredControllers = this.resolveRequire(directiveRequire);\n\n if (controllerInstance && this.directive.bindToController && isMap(directiveRequire)) {\n const /** @type {?} */ requiredControllersMap = /** @type {?} */(( requiredControllers as{[key: string]: IControllerInstance}));\n Object.keys(requiredControllersMap).forEach(key => {\n controllerInstance[key] = requiredControllersMap[key];\n });\n }\n\n return requiredControllers;\n }\n/**\n * @param {?} html\n * @return {?}\n */\nprivate compileHtml(html: string): angular.ILinkFn {\n this.element.innerHTML = html;\n return this.$compile(this.element.childNodes);\n }\n/**\n * @return {?}\n */\nprivate extractChildNodes(): Node[] {\n const /** @type {?} */ childNodes: Node[] = [];\n let /** @type {?} */ childNode: Node|null;\n\n while (childNode = this.element.firstChild) {\n this.element.removeChild(childNode);\n childNodes.push(childNode);\n }\n\n return childNodes;\n }\n/**\n * @return {?}\n */\nprivate getDirectiveRequire(): angular.DirectiveRequireProperty {\n const /** @type {?} */ require = this.directive.require || /** @type {?} */(( (this.directive.controller && this.directive.name)));\n\n if (isMap(require)) {\n Object.keys(require).forEach(key => {\n const /** @type {?} */ value = require[key];\n const /** @type {?} */ match = /** @type {?} */(( value.match(REQUIRE_PREFIX_RE)));\n const /** @type {?} */ name = value.substring(match[0].length);\n\n if (!name) {\n require[key] = match[0] + key;\n }\n });\n }\n\n return require;\n }\n/**\n * @param {?} require\n * @param {?=} controllerInstance\n * @return {?}\n */\nprivate resolveRequire(require: angular.DirectiveRequireProperty, controllerInstance?: any):\n angular.SingleOrListOrMap|null {\n if (!require) {\n return null;\n } else if (Array.isArray(require)) {\n return require.map(req => this.resolveRequire(req));\n } else if (typeof require === 'object') {\n const /** @type {?} */ value: {[key: string]: IControllerInstance} = {};\n Object.keys(require).forEach(key => value[key] = /** @type {?} */(( this.resolveRequire(require[key]))));\n return value;\n } else if (typeof require === 'string') {\n const /** @type {?} */ match = /** @type {?} */(( require.match(REQUIRE_PREFIX_RE)));\n const /** @type {?} */ inheritType = match[1] || match[3];\n\n const /** @type {?} */ name = require.substring(match[0].length);\n const /** @type {?} */ isOptional = !!match[2];\n const /** @type {?} */ searchParents = !!inheritType;\n const /** @type {?} */ startOnParent = inheritType === '^^';\n\n const /** @type {?} */ ctrlKey = controllerKey(name);\n const /** @type {?} */ elem = startOnParent ? /** @type {?} */(( this.$element.parent))() : this.$element;\n const /** @type {?} */ value = searchParents ? /** @type {?} */(( elem.inheritedData))(ctrlKey) : /** @type {?} */(( elem.data))(ctrlKey);\n\n if (!value && !isOptional) {\n throw new Error(\n `Unable to find required '${require}' in upgraded directive '${this.name}'.`);\n }\n\n return value;\n } else {\n throw new Error(\n `Unrecognized 'require' syntax on upgraded directive '${this.name}': ${require}`);\n }\n }\n}\n\nfunction UpgradeHelper_tsickle_Closure_declarations() {\n/** @type {?} */\nUpgradeHelper.prototype.$injector;\n/** @type {?} */\nUpgradeHelper.prototype.element;\n/** @type {?} */\nUpgradeHelper.prototype.$element;\n/** @type {?} */\nUpgradeHelper.prototype.directive;\n/** @type {?} */\nUpgradeHelper.prototype.$compile;\n/** @type {?} */\nUpgradeHelper.prototype.$controller;\n/** @type {?} */\nUpgradeHelper.prototype.injector;\n/** @type {?} */\nUpgradeHelper.prototype.name;\n}\n\n/**\n * @template T\n * @param {?} property\n * @return {?}\n */\nfunction getOrCall(property: T | Function): T {\n return isFunction(property) ? property() : property;\n}\n/**\n * @template T\n * @param {?} value\n * @return {?}\n */\nfunction isMap(value: angular.SingleOrListOrMap): value is {[key: string]: T} {\n return value && !Array.isArray(value) && typeof value === 'object';\n}\n/**\n * @param {?} name\n * @param {?} feature\n * @return {?}\n */\nfunction notSupported(name: string, feature: string) {\n throw new Error(`Upgraded directive '${name}' contains unsupported feature: '${feature}'.`);\n}\n","/**\n * @license\n * Copyright Google Inc. 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\nimport {ComponentFactory, ComponentFactoryResolver, Injector, Type} from '@angular/core';\n\nimport * as angular from './angular1';\nimport {$COMPILE, $INJECTOR, $PARSE, INJECTOR_KEY, REQUIRE_INJECTOR, REQUIRE_NG_MODEL} from './constants';\nimport {DowngradeComponentAdapter} from './downgrade_component_adapter';\nimport {controllerKey, getComponentName} from './util';\n/**\n * \\@whatItDoes \n * \n * *Part of the [upgrade/static](api?query=upgrade%2Fstatic)\n * library for hybrid upgrade apps that support AoT compilation*\n * \n * Allows an Angular component to be used from AngularJS.\n * \n * \\@howToUse \n * \n * Let's assume that you have an Angular component called `ng2Heroes` that needs\n * to be made available in AngularJS templates.\n * \n * {\\@example upgrade/static/ts/module.ts region=\"ng2-heroes\"}\n * \n * We must create an AngularJS [directive](https://docs.angularjs.org/guide/directive)\n * that will make this Angular component available inside AngularJS templates.\n * The `downgradeComponent()` function returns a factory function that we\n * can use to define the AngularJS directive that wraps the \"downgraded\" component.\n * \n * {\\@example upgrade/static/ts/module.ts region=\"ng2-heroes-wrapper\"}\n * \n * \\@description \n * \n * A helper function that returns a factory function to be used for registering an\n * AngularJS wrapper directive for \"downgrading\" an Angular component.\n * \n * The parameter contains information about the Component that is being downgraded:\n * \n * * `component: Type`: The type of the Component that will be downgraded\n * \n * \\@experimental\n * @param {?} info\n * @return {?}\n */\nexport function downgradeComponent(info: {\n component: Type;\n /** @deprecated since v4. This parameter is no longer used */\n inputs?: string[];\n /** @deprecated since v4. This parameter is no longer used */\n outputs?: string[];\n /** @deprecated since v4. This parameter is no longer used */\n selectors?: string[];\n}): any /* angular.IInjectable */ {\n const /** @type {?} */ directiveFactory:\n angular.IAnnotatedFunction = function(\n $compile: angular.ICompileService,\n $injector: angular.IInjectorService,\n $parse: angular.IParseService): angular.IDirective {\n\n return {\n restrict: 'E',\n terminal: true,\n require: [REQUIRE_INJECTOR, REQUIRE_NG_MODEL],\n link: (scope: angular.IScope, element: angular.IAugmentedJQuery, attrs: angular.IAttributes,\n required: any[]) => {\n // We might have to compile the contents asynchronously, because this might have been\n // triggered by `UpgradeNg1ComponentAdapterBuilder`, before the Angular templates have\n // been compiled.\n\n const /** @type {?} */ parentInjector: Injector|ParentInjectorPromise =\n required[0] || $injector.get(INJECTOR_KEY);\n const /** @type {?} */ ngModel: angular.INgModelController = required[1];\n\n const /** @type {?} */ downgradeFn = (injector: Injector) => {\n const /** @type {?} */ componentFactoryResolver: ComponentFactoryResolver =\n injector.get(ComponentFactoryResolver);\n const /** @type {?} */ componentFactory: ComponentFactory = /** @type {?} */((\n componentFactoryResolver.resolveComponentFactory(info.component)));\n\n if (!componentFactory) {\n throw new Error('Expecting ComponentFactory for: ' + getComponentName(info.component));\n }\n\n const /** @type {?} */ injectorPromise = new ParentInjectorPromise(element);\n const /** @type {?} */ facade = new DowngradeComponentAdapter(\n element, attrs, scope, ngModel, injector, $injector, $compile, $parse,\n componentFactory);\n\n const /** @type {?} */ projectableNodes = facade.compileContents();\n facade.createComponent(projectableNodes);\n facade.setupInputs();\n facade.setupOutputs();\n facade.registerCleanup();\n\n injectorPromise.resolve(facade.getInjector());\n };\n\n if (parentInjector instanceof ParentInjectorPromise) {\n parentInjector.then(downgradeFn);\n } else {\n downgradeFn(parentInjector);\n }\n }\n };\n };\n\n // bracket-notation because of closure - see #14441\n directiveFactory['$inject'] = [$COMPILE, $INJECTOR, $PARSE];\n return directiveFactory;\n}\n/**\n * Synchronous promise-like object to wrap parent injectors,\n * to preserve the synchronous nature of Angular 1's $compile.\n */\nclass ParentInjectorPromise {\nprivate injector: Injector;\nprivate injectorKey: string = controllerKey(INJECTOR_KEY);\nprivate callbacks: ((injector: Injector) => any)[] = [];\n/**\n * @param {?} element\n */\nconstructor(private element: angular.IAugmentedJQuery) {\n // Store the promise on the element.\n element.data !(this.injectorKey, this);\n }\n/**\n * @param {?} callback\n * @return {?}\n */\nthen(callback: (injector: Injector) => any) {\n if (this.injector) {\n callback(this.injector);\n } else {\n this.callbacks.push(callback);\n }\n }\n/**\n * @param {?} injector\n * @return {?}\n */\nresolve(injector: Injector) {\n this.injector = injector; /** @type {?} */((\n\n // Store the real injector on the element.\n this.element.data))(this.injectorKey, injector);\n\n // Release the element to prevent memory leaks.\n this.element = /** @type {?} */(( null));\n\n // Run the queued callbacks.\n this.callbacks.forEach(callback => callback(injector));\n this.callbacks.length = 0;\n }\n}\n\nfunction ParentInjectorPromise_tsickle_Closure_declarations() {\n/** @type {?} */\nParentInjectorPromise.prototype.injector;\n/** @type {?} */\nParentInjectorPromise.prototype.injectorKey;\n/** @type {?} */\nParentInjectorPromise.prototype.callbacks;\n/** @type {?} */\nParentInjectorPromise.prototype.element;\n}\n\n","/**\n * @license\n * Copyright Google Inc. 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\nimport {Injector} from '@angular/core';\nimport {INJECTOR_KEY} from './constants';\n/**\n * \\@whatItDoes \n * \n * *Part of the [upgrade/static](api?query=upgrade%2Fstatic)\n * library for hybrid upgrade apps that support AoT compilation*\n * \n * Allow an Angular service to be accessible from AngularJS.\n * \n * \\@howToUse \n * \n * First ensure that the service to be downgraded is provided in an {\\@link NgModule}\n * that will be part of the upgrade application. For example, let's assume we have\n * defined `HeroesService`\n * \n * {\\@example upgrade/static/ts/module.ts region=\"ng2-heroes-service\"}\n * \n * and that we have included this in our upgrade app {\\@link NgModule}\n * \n * {\\@example upgrade/static/ts/module.ts region=\"ng2-module\"}\n * \n * Now we can register the `downgradeInjectable` factory function for the service\n * on an AngularJS module.\n * \n * {\\@example upgrade/static/ts/module.ts region=\"downgrade-ng2-heroes-service\"}\n * \n * Inside an AngularJS component's controller we can get hold of the\n * downgraded service via the name we gave when downgrading.\n * \n * {\\@example upgrade/static/ts/module.ts region=\"example-app\"}\n * \n * \\@description \n * \n * Takes a `token` that identifies a service provided from Angular.\n * \n * Returns a [factory function](https://docs.angularjs.org/guide/di) that can be\n * used to register the service on an AngularJS module.\n * \n * The factory function provides access to the Angular service that\n * is identified by the `token` parameter.\n * \n * \\@experimental\n * @param {?} token\n * @return {?}\n */\nexport function downgradeInjectable(token: any): Function {\n const /** @type {?} */ factory = function(i: Injector) { return i.get(token); };\n ( /** @type {?} */((factory as any)))['$inject'] = [INJECTOR_KEY];\n\n return factory;\n}\n","/**\n * @license\n * Copyright Google Inc. 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\nimport {ChangeDetectorRef, ComponentFactory, ComponentRef, EventEmitter, Injector, OnChanges, ReflectiveInjector, SimpleChange, SimpleChanges, Type} from '@angular/core';\n\nimport * as angular from './angular1';\nimport {PropertyBinding} from './component_info';\nimport {$SCOPE} from './constants';\nimport {getAttributesAsArray, getComponentName, hookupNgModel, strictEquals} from './util';\n\nconst /** @type {?} */ INITIAL_VALUE = {\n __UNINITIALIZED__: true\n};\nexport class DowngradeComponentAdapter {\nprivate inputChangeCount: number = 0;\nprivate inputChanges: SimpleChanges|null = null;\nprivate componentScope: angular.IScope;\nprivate componentRef: ComponentRef|null = null;\nprivate component: any = null;\nprivate changeDetector: ChangeDetectorRef|null = null;\n/**\n * @param {?} element\n * @param {?} attrs\n * @param {?} scope\n * @param {?} ngModel\n * @param {?} parentInjector\n * @param {?} $injector\n * @param {?} $compile\n * @param {?} $parse\n * @param {?} componentFactory\n */\nconstructor(\nprivate element: angular.IAugmentedJQuery,\nprivate attrs: angular.IAttributes,\nprivate scope: angular.IScope,\nprivate ngModel: angular.INgModelController,\nprivate parentInjector: Injector,\nprivate $injector: angular.IInjectorService,\nprivate $compile: angular.ICompileService,\nprivate $parse: angular.IParseService,\nprivate componentFactory: ComponentFactory) {\n this.componentScope = scope.$new();\n }\n/**\n * @return {?}\n */\ncompileContents(): Node[][] {\n const /** @type {?} */ compiledProjectableNodes: Node[][] = [];\n const /** @type {?} */ projectableNodes: Node[][] = this.groupProjectableNodes();\n const /** @type {?} */ linkFns = projectableNodes.map(nodes => this.$compile(nodes)); /** @type {?} */((\n\n this.element.empty))();\n\n linkFns.forEach(linkFn => {\n linkFn(this.scope, (clone: Node[]) => {\n compiledProjectableNodes.push(clone); /** @type {?} */((\n this.element.append))(clone);\n });\n });\n\n return compiledProjectableNodes;\n }\n/**\n * @param {?} projectableNodes\n * @return {?}\n */\ncreateComponent(projectableNodes: Node[][]) {\n const /** @type {?} */ childInjector = ReflectiveInjector.resolveAndCreate(\n [{provide: $SCOPE, useValue: this.componentScope}], this.parentInjector);\n\n this.componentRef =\n this.componentFactory.create(childInjector, projectableNodes, this.element[0]);\n this.changeDetector = this.componentRef.changeDetectorRef;\n this.component = this.componentRef.instance;\n\n hookupNgModel(this.ngModel, this.component);\n }\n/**\n * @return {?}\n */\nsetupInputs(): void {\n const /** @type {?} */ attrs = this.attrs;\n const /** @type {?} */ inputs = this.componentFactory.inputs || [];\n for (let /** @type {?} */ i = 0; i < inputs.length; i++) {\n const /** @type {?} */ input = new PropertyBinding(inputs[i].propName, inputs[i].templateName);\n let /** @type {?} */ expr: string|null = null;\n\n if (attrs.hasOwnProperty(input.attr)) {\n const /** @type {?} */ observeFn = (prop => {\n let /** @type {?} */ prevValue = INITIAL_VALUE;\n return (currValue: any) => {\n // Initially, both `$observe()` and `$watch()` will call this function.\n if (!strictEquals(prevValue, currValue)) {\n if (prevValue === INITIAL_VALUE) {\n prevValue = currValue;\n }\n\n this.updateInput(prop, prevValue, currValue);\n prevValue = currValue;\n }\n };\n })(input.prop);\n attrs.$observe(input.attr, observeFn);\n\n // Use `$watch()` (in addition to `$observe()`) in order to initialize the input in time\n // for `ngOnChanges()`. This is necessary if we are already in a `$digest`, which means that\n // `ngOnChanges()` (which is called by a watcher) will run before the `$observe()` callback.\n let /** @type {?} */ unwatch: Function|null = this.componentScope.$watch(() => { /** @type {?} */((\n unwatch))();\n unwatch = null;\n observeFn(attrs[input.attr]);\n });\n\n } else if (attrs.hasOwnProperty(input.bindAttr)) {\n expr = attrs[input.bindAttr];\n } else if (attrs.hasOwnProperty(input.bracketAttr)) {\n expr = attrs[input.bracketAttr];\n } else if (attrs.hasOwnProperty(input.bindonAttr)) {\n expr = attrs[input.bindonAttr];\n } else if (attrs.hasOwnProperty(input.bracketParenAttr)) {\n expr = attrs[input.bracketParenAttr];\n }\n if (expr != null) {\n const /** @type {?} */ watchFn =\n (prop => (currValue: any, prevValue: any) =>\n this.updateInput(prop, prevValue, currValue))(input.prop);\n this.componentScope.$watch(expr, watchFn);\n }\n }\n\n const /** @type {?} */ prototype = this.componentFactory.componentType.prototype;\n if (prototype && ( /** @type {?} */((prototype))).ngOnChanges) {\n // Detect: OnChanges interface\n this.inputChanges = {};\n this.componentScope.$watch(() => this.inputChangeCount, () => {\n const /** @type {?} */ inputChanges = this.inputChanges;\n this.inputChanges = {};\n ( /** @type {?} */((this.component))).ngOnChanges( /** @type {?} */((inputChanges)));\n });\n }\n this.componentScope.$watch(() => this.changeDetector && this.changeDetector.detectChanges());\n }\n/**\n * @return {?}\n */\nsetupOutputs() {\n const /** @type {?} */ attrs = this.attrs;\n const /** @type {?} */ outputs = this.componentFactory.outputs || [];\n for (let /** @type {?} */ j = 0; j < outputs.length; j++) {\n const /** @type {?} */ output = new PropertyBinding(outputs[j].propName, outputs[j].templateName);\n let /** @type {?} */ expr: string|null = null;\n let /** @type {?} */ assignExpr = false;\n\n const /** @type {?} */ bindonAttr = output.bindonAttr.substring(0, output.bindonAttr.length - 6);\n const /** @type {?} */ bracketParenAttr =\n `[(${output.bracketParenAttr.substring(2, output.bracketParenAttr.length - 8)})]`;\n\n if (attrs.hasOwnProperty(output.onAttr)) {\n expr = attrs[output.onAttr];\n } else if (attrs.hasOwnProperty(output.parenAttr)) {\n expr = attrs[output.parenAttr];\n } else if (attrs.hasOwnProperty(bindonAttr)) {\n expr = attrs[bindonAttr];\n assignExpr = true;\n } else if (attrs.hasOwnProperty(bracketParenAttr)) {\n expr = attrs[bracketParenAttr];\n assignExpr = true;\n }\n\n if (expr != null && assignExpr != null) {\n const /** @type {?} */ getter = this.$parse(expr);\n const /** @type {?} */ setter = getter.assign;\n if (assignExpr && !setter) {\n throw new Error(`Expression '${expr}' is not assignable!`);\n }\n const /** @type {?} */ emitter = /** @type {?} */(( this.component[output.prop] as EventEmitter));\n if (emitter) {\n emitter.subscribe({\n next: assignExpr ? (v: any) => /** @type {?} */(( setter))(this.scope, v) :\n (v: any) => getter(this.scope, {'$event': v})\n });\n } else {\n throw new Error(\n `Missing emitter '${output.prop}' on component '${getComponentName(this.componentFactory.componentType)}'!`);\n }\n }\n }\n }\n/**\n * @return {?}\n */\nregisterCleanup() { /** @type {?} */((\n this.element.bind))('$destroy', () => {\n this.componentScope.$destroy(); /** @type {?} */((\n this.componentRef)).destroy();\n });\n }\n/**\n * @return {?}\n */\ngetInjector(): Injector { return /** @type {?} */(( this.componentRef)) && /** @type {?} */(( this.componentRef)).injector; }\n/**\n * @param {?} prop\n * @param {?} prevValue\n * @param {?} currValue\n * @return {?}\n */\nprivate updateInput(prop: string, prevValue: any, currValue: any) {\n if (this.inputChanges) {\n this.inputChangeCount++;\n this.inputChanges[prop] = new SimpleChange(prevValue, currValue, prevValue === currValue);\n }\n\n this.component[prop] = currValue;\n }\n/**\n * @return {?}\n */\ngroupProjectableNodes() {\n let /** @type {?} */ ngContentSelectors = this.componentFactory.ngContentSelectors;\n return groupNodesBySelector(ngContentSelectors, /** @type {?} */(( this.element.contents))());\n }\n}\n\nfunction DowngradeComponentAdapter_tsickle_Closure_declarations() {\n/** @type {?} */\nDowngradeComponentAdapter.prototype.inputChangeCount;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.inputChanges;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.componentScope;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.componentRef;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.component;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.changeDetector;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.element;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.attrs;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.scope;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.ngModel;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.parentInjector;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.$injector;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.$compile;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.$parse;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.componentFactory;\n}\n\n/**\n * Group a set of DOM nodes into `ngContent` groups, based on the given content selectors.\n * @param {?} ngContentSelectors\n * @param {?} nodes\n * @return {?}\n */\nexport function groupNodesBySelector(ngContentSelectors: string[], nodes: Node[]): Node[][] {\n const /** @type {?} */ projectableNodes: Node[][] = [];\n let /** @type {?} */ wildcardNgContentIndex: number;\n\n for (let /** @type {?} */ i = 0, /** @type {?} */ ii = ngContentSelectors.length; i < ii; ++i) {\n projectableNodes[i] = [];\n }\n\n for (let /** @type {?} */ j = 0, /** @type {?} */ jj = nodes.length; j < jj; ++j) {\n const /** @type {?} */ node = nodes[j];\n const /** @type {?} */ ngContentIndex = findMatchingNgContentIndex(node, ngContentSelectors);\n if (ngContentIndex != null) {\n projectableNodes[ngContentIndex].push(node);\n }\n }\n\n return projectableNodes;\n}\n/**\n * @param {?} element\n * @param {?} ngContentSelectors\n * @return {?}\n */\nfunction findMatchingNgContentIndex(element: any, ngContentSelectors: string[]): number|null {\n const /** @type {?} */ ngContentIndices: number[] = [];\n let /** @type {?} */ wildcardNgContentIndex: number = -1;\n for (let /** @type {?} */ i = 0; i < ngContentSelectors.length; i++) {\n const /** @type {?} */ selector = ngContentSelectors[i];\n if (selector === '*') {\n wildcardNgContentIndex = i;\n } else {\n if (matchesSelector(element, selector)) {\n ngContentIndices.push(i);\n }\n }\n }\n ngContentIndices.sort();\n\n if (wildcardNgContentIndex !== -1) {\n ngContentIndices.push(wildcardNgContentIndex);\n }\n return ngContentIndices.length ? ngContentIndices[0] : null;\n}\n\nlet /** @type {?} */ _matches: (this: any, selector: string) => boolean;\n/**\n * @param {?} el\n * @param {?} selector\n * @return {?}\n */\nfunction matchesSelector(el: any, selector: string): boolean {\n if (!_matches) {\n const /** @type {?} */ elProto = /** @type {?} */(( Element.prototype));\n _matches = elProto.matches || elProto.matchesSelector || elProto.mozMatchesSelector ||\n elProto.msMatchesSelector || elProto.oMatchesSelector || elProto.webkitMatchesSelector;\n }\n return el.nodeType === Node.ELEMENT_NODE ? _matches.call(el, selector) : false;\n}\n","/**\n * @license\n * Copyright Google Inc. 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\nimport {Type} from '@angular/core';\nimport * as angular from './angular1';\n\nconst /** @type {?} */ DIRECTIVE_PREFIX_REGEXP = /^(?:x|data)[:\\-_]/i;\nconst /** @type {?} */ DIRECTIVE_SPECIAL_CHARS_REGEXP = /[:\\-_]+(.)/g;\n/**\n * @param {?} e\n * @return {?}\n */\nexport function onError(e: any) {\n // TODO: (misko): We seem to not have a stack trace here!\n if (console.error) {\n console.error(e, e.stack);\n } else {\n // tslint:disable-next-line:no-console\n console.log(e, e.stack);\n }\n throw e;\n}\n/**\n * @param {?} name\n * @return {?}\n */\nexport function controllerKey(name: string): string {\n return '$' + name + 'Controller';\n}\n/**\n * @param {?} name\n * @return {?}\n */\nexport function directiveNormalize(name: string): string {\n return name.replace(DIRECTIVE_PREFIX_REGEXP, '')\n .replace(DIRECTIVE_SPECIAL_CHARS_REGEXP, (_, letter) => letter.toUpperCase());\n}\n/**\n * @param {?} node\n * @return {?}\n */\nexport function getAttributesAsArray(node: Node): [string, string][] {\n const /** @type {?} */ attributes = node.attributes;\n let /** @type {?} */ asArray: [string, string][] = /** @type {?} */(( undefined));\n if (attributes) {\n let /** @type {?} */ attrLen = attributes.length;\n asArray = new Array(attrLen);\n for (let /** @type {?} */ i = 0; i < attrLen; i++) {\n asArray[i] = [attributes[i].nodeName, /** @type {?} */(( attributes[i].nodeValue))];\n }\n }\n return asArray || [];\n}\n/**\n * @param {?} component\n * @return {?}\n */\nexport function getComponentName(component: Type): string {\n // Return the name of the component or the first line of its stringified version.\n return ( /** @type {?} */((component as any))).overriddenName || component.name || component.toString().split('\\n')[0];\n}\n/**\n * @param {?} value\n * @return {?}\n */\nexport function isFunction(value: any): value is Function {\n return typeof value === 'function';\n}\nexport class Deferred {\n promise: Promise;\n resolve: (value?: R|PromiseLike) => void;\n reject: (error?: any) => void;\nconstructor() {\n this.promise = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n}\n\nfunction Deferred_tsickle_Closure_declarations() {\n/** @type {?} */\nDeferred.prototype.promise;\n/** @type {?} */\nDeferred.prototype.resolve;\n/** @type {?} */\nDeferred.prototype.reject;\n}\n\n/**\n * @param {?} component\n * @return {?} Whether the passed-in component implements the subset of the\n * `ControlValueAccessor` interface needed for AngularJS `ng-model`\n * compatibility.\n */\nfunction supportsNgModel(component: any) {\n return typeof component.writeValue === 'function' &&\n typeof component.registerOnChange === 'function';\n}\n/**\n * Glue the AngularJS `NgModelController` (if it exists) to the component\n * (if it implements the needed subset of the `ControlValueAccessor` interface).\n * @param {?} ngModel\n * @param {?} component\n * @return {?}\n */\nexport function hookupNgModel(ngModel: angular.INgModelController, component: any) {\n if (ngModel && supportsNgModel(component)) {\n ngModel.$render = () => { component.writeValue(ngModel.$viewValue); };\n component.registerOnChange(ngModel.$setViewValue.bind(ngModel));\n }\n}\n/**\n * Test two values for strict equality, accounting for the fact that `NaN !== NaN`.\n * @param {?} val1\n * @param {?} val2\n * @return {?}\n */\nexport function strictEquals(val1: any, val2: any): boolean {\n return val1 === val2 || (val1 !== val1 && val2 !== val2);\n}\n","\n/**\n * A `PropertyBinding` represents a mapping between a property name\n * and an attribute name. It is parsed from a string of the form\n * `\"prop: attr\"`; or simply `\"propAndAttr\" where the property\n * and attribute have the same identifier.\n */\nexport class PropertyBinding {\n bracketAttr: string;\n bracketParenAttr: string;\n parenAttr: string;\n onAttr: string;\n bindAttr: string;\n bindonAttr: string;\n/**\n * @param {?} prop\n * @param {?} attr\n */\nconstructor(public prop: string,\npublic attr: string) { this.parseBinding(); }\n/**\n * @return {?}\n */\nprivate parseBinding() {\n this.bracketAttr = `[${this.attr}]`;\n this.parenAttr = `(${this.attr})`;\n this.bracketParenAttr = `[(${this.attr})]`;\n const /** @type {?} */ capitalAttr = this.attr.charAt(0).toUpperCase() + this.attr.substr(1);\n this.onAttr = `on${capitalAttr}`;\n this.bindAttr = `bind${capitalAttr}`;\n this.bindonAttr = `bindon${capitalAttr}`;\n }\n}\n\nfunction PropertyBinding_tsickle_Closure_declarations() {\n/** @type {?} */\nPropertyBinding.prototype.bracketAttr;\n/** @type {?} */\nPropertyBinding.prototype.bracketParenAttr;\n/** @type {?} */\nPropertyBinding.prototype.parenAttr;\n/** @type {?} */\nPropertyBinding.prototype.onAttr;\n/** @type {?} */\nPropertyBinding.prototype.bindAttr;\n/** @type {?} */\nPropertyBinding.prototype.bindonAttr;\n/** @type {?} */\nPropertyBinding.prototype.prop;\n/** @type {?} */\nPropertyBinding.prototype.attr;\n}\n\n","\n/**\n * @license \n * Copyright Google Inc. 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 */\nexport const $COMPILE = '$compile';\nexport const /** @type {?} */ $CONTROLLER = '$controller';\nexport const /** @type {?} */ $DELEGATE = '$delegate';\nexport const /** @type {?} */ $HTTP_BACKEND = '$httpBackend';\nexport const /** @type {?} */ $INJECTOR = '$injector';\nexport const /** @type {?} */ $INTERVAL = '$interval';\nexport const /** @type {?} */ $PARSE = '$parse';\nexport const /** @type {?} */ $PROVIDE = '$provide';\nexport const /** @type {?} */ $ROOT_SCOPE = '$rootScope';\nexport const /** @type {?} */ $SCOPE = '$scope';\nexport const /** @type {?} */ $TEMPLATE_CACHE = '$templateCache';\nexport const /** @type {?} */ $TEMPLATE_REQUEST = '$templateRequest';\n\nexport const /** @type {?} */ $$TESTABILITY = '$$testability';\n\nexport const /** @type {?} */ COMPILER_KEY = '$$angularCompiler';\nexport const /** @type {?} */ GROUP_PROJECTABLE_NODES_KEY = '$$angularGroupProjectableNodes';\nexport const /** @type {?} */ INJECTOR_KEY = '$$angularInjector';\nexport const /** @type {?} */ NG_ZONE_KEY = '$$angularNgZone';\n\nexport const /** @type {?} */ REQUIRE_INJECTOR = '?^^' + INJECTOR_KEY;\nexport const /** @type {?} */ REQUIRE_NG_MODEL = '?ngModel';\n\nexport const /** @type {?} */ UPGRADE_MODULE_NAME = '$$UpgradeModule';\n","/**\n * @license\n * Copyright Google Inc. 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 type Ng1Token = string;\n\nexport type Ng1Expression = string | Function;\n\nexport interface IAnnotatedFunction extends Function { $inject?: Ng1Token[]; }\n\nexport type IInjectable = (Ng1Token | Function)[] | IAnnotatedFunction;\n\nexport type SingleOrListOrMap = T | T[] | {[key: string]: T};\n\nexport interface IModule {\n name: string;\n requires: (string|IInjectable)[];\n config(fn: IInjectable): IModule;\n directive(selector: string, factory: IInjectable): IModule;\n component(selector: string, component: IComponent): IModule;\n controller(name: string, type: IInjectable): IModule;\n factory(key: Ng1Token, factoryFn: IInjectable): IModule;\n value(key: Ng1Token, value: any): IModule;\n constant(token: Ng1Token, value: any): IModule;\n run(a: IInjectable): IModule;\n}\nexport interface ICompileService {\n (element: Element|NodeList|Node[]|string, transclude?: Function): ILinkFn;\n}\nexport interface ILinkFn {\n (scope: IScope, cloneAttachFn?: ICloneAttachFunction, options?: ILinkFnOptions): IAugmentedJQuery;\n $$slots?: {[slotName: string]: ILinkFn};\n}\nexport interface ILinkFnOptions {\n parentBoundTranscludeFn?: Function;\n transcludeControllers?: {[key: string]: any};\n futureParentElement?: Node;\n}\nexport interface IRootScopeService {\n $new(isolate?: boolean): IScope;\n $id: string;\n $parent: IScope;\n $root: IScope;\n $watch(exp: Ng1Expression, fn?: (a1?: any, a2?: any) => void): Function;\n $on(event: string, fn?: (event?: any, ...args: any[]) => void): Function;\n $destroy(): any;\n $apply(exp?: Ng1Expression): any;\n $digest(): any;\n $evalAsync(exp: Ng1Expression, locals?: any): void;\n $on(event: string, fn?: (event?: any, ...args: any[]) => void): Function;\n $$childTail: IScope;\n $$childHead: IScope;\n $$nextSibling: IScope;\n [key: string]: any;\n}\nexport interface IScope extends IRootScopeService {}\n\nexport interface IAngularBootstrapConfig { strictDi?: boolean; }\nexport interface IDirective {\n compile?: IDirectiveCompileFn;\n controller?: IController;\n controllerAs?: string;\n bindToController?: boolean|{[key: string]: string};\n link?: IDirectiveLinkFn|IDirectivePrePost;\n name?: string;\n priority?: number;\n replace?: boolean;\n require?: DirectiveRequireProperty;\n restrict?: string;\n scope?: boolean|{[key: string]: string};\n template?: string|Function;\n templateUrl?: string|Function;\n templateNamespace?: string;\n terminal?: boolean;\n transclude?: DirectiveTranscludeProperty;\n}\nexport type DirectiveRequireProperty = SingleOrListOrMap;\nexport type DirectiveTranscludeProperty = boolean | 'element' | {[key: string]: string};\nexport interface IDirectiveCompileFn {\n (templateElement: IAugmentedJQuery, templateAttributes: IAttributes,\n transclude: ITranscludeFunction): IDirectivePrePost;\n}\nexport interface IDirectivePrePost {\n pre?: IDirectiveLinkFn;\n post?: IDirectiveLinkFn;\n}\nexport interface IDirectiveLinkFn {\n (scope: IScope, instanceElement: IAugmentedJQuery, instanceAttributes: IAttributes,\n controller: any, transclude: ITranscludeFunction): void;\n}\nexport interface IComponent {\n bindings?: {[key: string]: string};\n controller?: string|IInjectable;\n controllerAs?: string;\n require?: DirectiveRequireProperty;\n template?: string|Function;\n templateUrl?: string|Function;\n transclude?: DirectiveTranscludeProperty;\n}\nexport interface IAttributes {\n $observe(attr: string, fn: (v: string) => void): void;\n [key: string]: any;\n}\nexport interface ITranscludeFunction {\n // If the scope is provided, then the cloneAttachFn must be as well.\n (scope: IScope, cloneAttachFn: ICloneAttachFunction): IAugmentedJQuery;\n // If one argument is provided, then it's assumed to be the cloneAttachFn.\n (cloneAttachFn?: ICloneAttachFunction): IAugmentedJQuery;\n}\nexport interface ICloneAttachFunction {\n // Let's hint but not force cloneAttachFn's signature\n (clonedElement?: IAugmentedJQuery, scope?: IScope): any;\n}\nexport type IAugmentedJQuery = Node[] & {\n bind?: (name: string, fn: () => void) => void;\n data?: (name: string, value?: any) => any;\n text?: () => string;\n inheritedData?: (name: string, value?: any) => any;\n contents?: () => IAugmentedJQuery;\n parent?: () => IAugmentedJQuery;\n empty?: () => void;\n append?: (content: IAugmentedJQuery | string) => IAugmentedJQuery;\n controller?: (name: string) => any;\n isolateScope?: () => IScope;\n injector?: () => IInjectorService;\n};\nexport interface IProvider { $get: IInjectable; }\nexport interface IProvideService {\n provider(token: Ng1Token, provider: IProvider): IProvider;\n factory(token: Ng1Token, factory: IInjectable): IProvider;\n service(token: Ng1Token, type: IInjectable): IProvider;\n value(token: Ng1Token, value: any): IProvider;\n constant(token: Ng1Token, value: any): void;\n decorator(token: Ng1Token, factory: IInjectable): void;\n}\nexport interface IParseService { (expression: string): ICompiledExpression; }\nexport interface ICompiledExpression {\n (context: any, locals: any): any;\n assign?: (context: any, value: any) => any;\n}\nexport interface IHttpBackendService {\n (method: string, url: string, post?: any, callback?: Function, headers?: any, timeout?: number,\n withCredentials?: boolean): void;\n}\nexport interface ICacheObject {\n put(key: string, value?: T): T;\n get(key: string): any;\n}\nexport interface ITemplateCacheService extends ICacheObject {}\nexport interface ITemplateRequestService {\n (template: string|any /* TrustedResourceUrl */, ignoreRequestError?: boolean): Promise;\n totalPendingRequests: number;\n}\nexport type IController = string | IInjectable;\nexport interface IControllerService {\n (controllerConstructor: IController, locals?: any, later?: any, ident?: any): any;\n (controllerName: string, locals?: any): any;\n}\n\nexport interface IInjectorService {\n get(key: string): any;\n has(key: string): boolean;\n}\n\nexport interface IIntervalService {\n (func: Function, delay: number, count?: number, invokeApply?: boolean,\n ...args: any[]): Promise;\n cancel(promise: Promise): boolean;\n}\n\nexport interface ITestabilityService {\n findBindings(element: Element, expression: string, opt_exactMatch?: boolean): Element[];\n findModels(element: Element, expression: string, opt_exactMatch?: boolean): Element[];\n getLocation(): string;\n setLocation(url: string): void;\n whenStable(callback: Function): void;\n}\n\nexport interface INgModelController {\n $render(): void;\n $isEmpty(value: any): boolean;\n $setValidity(validationErrorKey: string, isValid: boolean): void;\n $setPristine(): void;\n $setDirty(): void;\n $setUntouched(): void;\n $setTouched(): void;\n $rollbackViewValue(): void;\n $validate(): void;\n $commitViewValue(): void;\n $setViewValue(value: any, trigger: string): void;\n\n $viewValue: any;\n $modelValue: any;\n $parsers: Function[];\n $formatters: Function[];\n $validators: {[key: string]: Function};\n $asyncValidators: {[key: string]: Function};\n $viewChangeListeners: Function[];\n $error: Object;\n $pending: Object;\n $untouched: boolean;\n $touched: boolean;\n $pristine: boolean;\n $dirty: boolean;\n $valid: boolean;\n $invalid: boolean;\n $name: string;\n}\n/**\n * @return {?}\n */\nfunction noNg() {\n throw new Error('AngularJS v1.x is not loaded!');\n}\n\n\nlet /** @type {?} */ angular: {\n bootstrap: (e: Element, modules: (string | IInjectable)[], config?: IAngularBootstrapConfig) =>\n IInjectorService,\n module: (prefix: string, dependencies?: string[]) => IModule,\n element: (e: Element | string) => IAugmentedJQuery,\n version: {major: number},\n resumeBootstrap: () => void,\n getTestability: (e: Element) => ITestabilityService\n} = /** @type {?} */(( {\n bootstrap: noNg,\n module: noNg,\n element: noNg,\n version: noNg,\n resumeBootstrap: noNg,\n getTestability: noNg\n}));\n\ntry {\n if (window.hasOwnProperty('angular')) {\n angular = ( /** @type {?} */((window))).angular;\n }\n} catch ( /** @type {?} */e) {\n // ignore in CJS mode.\n}\n/**\n * Resets the AngularJS library.\n * \n * Used when angularjs is loaded lazily, and not available on `window`.\n * \n * \\@stable\n * @param {?} ng\n * @return {?}\n */\nexport function setAngularLib(ng: any): void {\n angular = ng;\n}\n/**\n * Returns the current version of the AngularJS library.\n * \n * \\@stable\n * @return {?}\n */\nexport function getAngularLib(): any {\n return angular;\n}\n\nexport const /** @type {?} */ bootstrap =\n (e: Element, modules: (string | IInjectable)[], config?: IAngularBootstrapConfig) =>\n angular.bootstrap(e, modules, config);\n\nexport const /** @type {?} */ module = (prefix: string, dependencies?: string[]) =>\n angular.module(prefix, dependencies);\n\nexport const /** @type {?} */ element = (e: Element | string) => angular.element(e);\n\nexport const /** @type {?} */ resumeBootstrap = () => angular.resumeBootstrap();\n\nexport const /** @type {?} */ getTestability = (e: Element) => angular.getTestability(e);\n\nexport const /** @type {?} */ version = angular.version;\n"],"names":["NgModule","Testability","Compiler","Injector","NgZone","platformBrowserDynamic","EventEmitter","Inject","ElementRef","Directive","angular.element","ComponentFactoryResolver","ReflectiveInjector"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AUsOA,SAAA,IAAA,GAAA;IACE,MAAF,IAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CACA;AACA,IAAE,OAAF,IAAA;IACE,SAAF,EAAA,IAAA;IACA,MAAA,EAAA,IAAA;IAAI,OAEJ,EAAA,IAAA;IACE,OAAF,EAAA,IAAA;IACA,eAAA,EAAA,IAAA;IACA,cAAA,EAAA,IAAA;CACC,CAAD,CAAA;AAFE,IAAF;;QAIA,OAAA,GAAA,EAAA,MAAA,GAAA,OAAA,CAAA;;;;;;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