UNPKG

171 kBSource Map (JSON)View Raw
1{"version":3,"file":"upgrade.umd.js","sources":["../../../../../packages/upgrade/src/common/src/version.ts","../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../packages/upgrade/src/common/src/angular1.ts","../../../../../packages/upgrade/src/common/src/constants.ts","../../../../../packages/upgrade/src/common/src/component_info.ts","../../../../../packages/upgrade/src/common/src/util.ts","../../../../../packages/upgrade/src/common/src/downgrade_component_adapter.ts","../../../../../packages/upgrade/src/common/src/promise_util.ts","../../../../../packages/upgrade/src/common/src/downgrade_component.ts","../../../../../packages/upgrade/src/common/src/downgrade_injectable.ts","../../../../../packages/upgrade/src/common/src/upgrade_helper.ts","../../../../../packages/upgrade/src/dynamic/src/upgrade_ng1_adapter.ts","../../../../../packages/upgrade/src/dynamic/src/upgrade_adapter.ts","../../../../../packages/upgrade/public_api.ts","../../../../../packages/upgrade/index.ts","../../../../../packages/upgrade/upgrade.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('10.0.8');\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport type Ng1Token = string;\n\nexport type Ng1Expression = string|Function;\n\nexport interface IAnnotatedFunction extends Function {\n // Older versions of `@types/angular` typings extend the global `Function` interface with\n // `$inject?: string[]`, which is not compatible with `$inject?: ReadonlyArray<string>` (used in\n // latest versions).\n $inject?: Function extends {$inject?: string[]}? Ng1Token[]: ReadonlyArray<Ng1Token>;\n}\n\nexport type IInjectable = (Ng1Token|Function)[]|IAnnotatedFunction;\n\nexport type SingleOrListOrMap<T> = 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 {\n strictDi?: boolean;\n}\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<string>;\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 (clonedElement: IAugmentedJQuery, scope: IScope): any;\n}\nexport type IAugmentedJQuery = Node[]&{\n on?: (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 triggerHandler?: (eventTypeOrObject: string|Event, extraParameters?: any[]) => IAugmentedJQuery;\n remove?: () => void;\n removeData?: () => void;\n};\nexport interface IProvider {\n $get: IInjectable;\n}\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 {\n (expression: string): ICompiledExpression;\n}\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<T>(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<string>;\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<any>;\n cancel(promise: Promise<any>): 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\nfunction noNg(): never {\n throw new Error('AngularJS v1.x is not loaded!');\n}\n\nconst noNgElement: typeof angular.element = (() => noNg()) as any;\nnoNgElement.cleanData = noNg;\n\nlet angular: {\n bootstrap: (e: Element, modules: (string|IInjectable)[], config?: IAngularBootstrapConfig) =>\n IInjectorService,\n module: (prefix: string, dependencies?: string[]) => IModule,\n element: {\n (e: string|Element|Document|IAugmentedJQuery): IAugmentedJQuery;\n cleanData: (nodes: Node[]|NodeList) => void;\n },\n injector: (modules: Array<string|IInjectable>, strictDi?: boolean) => IInjectorService,\n version: {major: number},\n resumeBootstrap: () => void,\n getTestability: (e: Element) => ITestabilityService\n} = {\n bootstrap: noNg,\n module: noNg,\n element: noNgElement,\n injector: noNg,\n version: undefined as any,\n resumeBootstrap: noNg,\n getTestability: noNg\n};\n\ntry {\n if (window.hasOwnProperty('angular')) {\n angular = (<any>window).angular;\n }\n} catch {\n // ignore in CJS mode.\n}\n\n/**\n * @deprecated Use `setAngularJSGlobal` instead.\n *\n * @publicApi\n */\nexport function setAngularLib(ng: any): void {\n setAngularJSGlobal(ng);\n}\n\n/**\n * @deprecated Use `getAngularJSGlobal` instead.\n *\n * @publicApi\n */\nexport function getAngularLib(): any {\n return getAngularJSGlobal();\n}\n\n/**\n * Resets the AngularJS global.\n *\n * Used when AngularJS is loaded lazily, and not available on `window`.\n *\n * @publicApi\n */\nexport function setAngularJSGlobal(ng: any): void {\n angular = ng;\n}\n\n/**\n * Returns the current AngularJS global.\n *\n * @publicApi\n */\nexport function getAngularJSGlobal(): any {\n return angular;\n}\n\nexport const bootstrap: typeof angular.bootstrap = (e, modules, config?) =>\n angular.bootstrap(e, modules, config);\n\n// Do not declare as `module` to avoid webpack bug\n// (see https://github.com/angular/angular/issues/30050).\nexport const module_: typeof angular.module = (prefix, dependencies?) =>\n angular.module(prefix, dependencies);\n\nexport const element: typeof angular.element = (e => angular.element(e)) as typeof angular.element;\nelement.cleanData = nodes => angular.element.cleanData(nodes);\n\nexport const injector: typeof angular.injector =\n (modules: Array<string|IInjectable>, strictDi?: boolean) => angular.injector(modules, strictDi);\n\nexport const resumeBootstrap: typeof angular.resumeBootstrap = () => angular.resumeBootstrap();\n\nexport const getTestability: typeof angular.getTestability = e => angular.getTestability(e);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const $COMPILE = '$compile';\nexport const $CONTROLLER = '$controller';\nexport const $DELEGATE = '$delegate';\nexport const $EXCEPTION_HANDLER = '$exceptionHandler';\nexport const $HTTP_BACKEND = '$httpBackend';\nexport const $INJECTOR = '$injector';\nexport const $INTERVAL = '$interval';\nexport const $PARSE = '$parse';\nexport const $PROVIDE = '$provide';\nexport const $ROOT_SCOPE = '$rootScope';\nexport const $SCOPE = '$scope';\nexport const $TEMPLATE_CACHE = '$templateCache';\nexport const $TEMPLATE_REQUEST = '$templateRequest';\n\nexport const $$TESTABILITY = '$$testability';\n\nexport const COMPILER_KEY = '$$angularCompiler';\nexport const DOWNGRADED_MODULE_COUNT_KEY = '$$angularDowngradedModuleCount';\nexport const GROUP_PROJECTABLE_NODES_KEY = '$$angularGroupProjectableNodes';\nexport const INJECTOR_KEY = '$$angularInjector';\nexport const LAZY_MODULE_REF = '$$angularLazyModuleRef';\nexport const NG_ZONE_KEY = '$$angularNgZone';\nexport const UPGRADE_APP_TYPE_KEY = '$$angularUpgradeAppType';\n\nexport const REQUIRE_INJECTOR = '?^^' + INJECTOR_KEY;\nexport const REQUIRE_NG_MODEL = '?ngModel';\n\nexport const UPGRADE_MODULE_NAME = '$$UpgradeModule';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * 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 // TODO(issue/24571): remove '!'.\n bracketAttr!: string;\n // TODO(issue/24571): remove '!'.\n bracketParenAttr!: string;\n // TODO(issue/24571): remove '!'.\n parenAttr!: string;\n // TODO(issue/24571): remove '!'.\n onAttr!: string;\n // TODO(issue/24571): remove '!'.\n bindAttr!: string;\n // TODO(issue/24571): remove '!'.\n bindonAttr!: string;\n\n constructor(public prop: string, public attr: string) {\n this.parseBinding();\n }\n\n private parseBinding() {\n this.bracketAttr = `[${this.attr}]`;\n this.parenAttr = `(${this.attr})`;\n this.bracketParenAttr = `[(${this.attr})]`;\n const 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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, Type} from '@angular/core';\n\nimport {IInjectorService, INgModelController} from './angular1';\nimport {DOWNGRADED_MODULE_COUNT_KEY, UPGRADE_APP_TYPE_KEY} from './constants';\n\nconst DIRECTIVE_PREFIX_REGEXP = /^(?:x|data)[:\\-_]/i;\nconst DIRECTIVE_SPECIAL_CHARS_REGEXP = /[:\\-_]+(.)/g;\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\nexport function controllerKey(name: string): string {\n return '$' + name + 'Controller';\n}\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\nexport function getTypeName(type: Type<any>): string {\n // Return the name of the type or the first line of its stringified version.\n return (type as any).overriddenName || type.name || type.toString().split('\\n')[0];\n}\n\nexport function getDowngradedModuleCount($injector: IInjectorService): number {\n return $injector.has(DOWNGRADED_MODULE_COUNT_KEY) ? $injector.get(DOWNGRADED_MODULE_COUNT_KEY) :\n 0;\n}\n\nexport function getUpgradeAppType($injector: IInjectorService): UpgradeAppType {\n return $injector.has(UPGRADE_APP_TYPE_KEY) ? $injector.get(UPGRADE_APP_TYPE_KEY) :\n UpgradeAppType.None;\n}\n\nexport function isFunction(value: any): value is Function {\n return typeof value === 'function';\n}\n\nexport function validateInjectionKey(\n $injector: IInjectorService, downgradedModule: string, injectionKey: string,\n attemptedAction: string): void {\n const upgradeAppType = getUpgradeAppType($injector);\n const downgradedModuleCount = getDowngradedModuleCount($injector);\n\n // Check for common errors.\n switch (upgradeAppType) {\n case UpgradeAppType.Dynamic:\n case UpgradeAppType.Static:\n if (downgradedModule) {\n throw new Error(\n `Error while ${attemptedAction}: 'downgradedModule' unexpectedly specified.\\n` +\n 'You should not specify a value for \\'downgradedModule\\', unless you are downgrading ' +\n 'more than one Angular module (via \\'downgradeModule()\\').');\n }\n break;\n case UpgradeAppType.Lite:\n if (!downgradedModule && (downgradedModuleCount >= 2)) {\n throw new Error(\n `Error while ${attemptedAction}: 'downgradedModule' not specified.\\n` +\n 'This application contains more than one downgraded Angular module, thus you need to ' +\n 'always specify \\'downgradedModule\\' when downgrading components and injectables.');\n }\n\n if (!$injector.has(injectionKey)) {\n throw new Error(\n `Error while ${attemptedAction}: Unable to find the specified downgraded module.\\n` +\n 'Did you forget to downgrade an Angular module or include it in the AngularJS ' +\n 'application?');\n }\n\n break;\n default:\n throw new Error(\n `Error while ${attemptedAction}: Not a valid '@angular/upgrade' application.\\n` +\n 'Did you forget to downgrade an Angular module or include it in the AngularJS ' +\n 'application?');\n }\n}\n\nexport class Deferred<R> {\n promise: Promise<R>;\n // TODO(issue/24571): remove '!'.\n resolve!: (value?: R|PromiseLike<R>) => void;\n // TODO(issue/24571): remove '!'.\n reject!: (error?: any) => void;\n\n constructor() {\n this.promise = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n}\n\nexport interface LazyModuleRef {\n injector?: Injector;\n promise?: Promise<Injector>;\n}\n\nexport const enum UpgradeAppType {\n // App NOT using `@angular/upgrade`. (This should never happen in an `ngUpgrade` app.)\n None,\n\n // App using the deprecated `@angular/upgrade` APIs (a.k.a. dynamic `ngUpgrade`).\n Dynamic,\n\n // App using `@angular/upgrade/static` with `UpgradeModule`.\n Static,\n\n // App using @angular/upgrade/static` with `downgradeModule()` (a.k.a `ngUpgrade`-lite ).\n Lite,\n}\n\n/**\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/**\n * Glue the AngularJS `NgModelController` (if it exists) to the component\n * (if it implements the needed subset of the `ControlValueAccessor` interface).\n */\nexport function hookupNgModel(ngModel: INgModelController, component: any) {\n if (ngModel && supportsNgModel(component)) {\n ngModel.$render = () => {\n component.writeValue(ngModel.$viewValue);\n };\n component.registerOnChange(ngModel.$setViewValue.bind(ngModel));\n if (typeof component.registerOnTouched === 'function') {\n component.registerOnTouched(ngModel.$setTouched.bind(ngModel));\n }\n }\n}\n\n/**\n * Test two values for strict equality, accounting for the fact that `NaN !== NaN`.\n */\nexport function strictEquals(val1: any, val2: any): boolean {\n return val1 === val2 || (val1 !== val1 && val2 !== val2);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationRef, ChangeDetectorRef, ComponentFactory, ComponentRef, EventEmitter, Injector, OnChanges, SimpleChange, SimpleChanges, StaticProvider, Testability, TestabilityRegistry, Type} from '@angular/core';\n\nimport {IAttributes, IAugmentedJQuery, ICompileService, IInjectorService, INgModelController, IParseService, IScope} from './angular1';\nimport {PropertyBinding} from './component_info';\nimport {$SCOPE} from './constants';\nimport {getTypeName, hookupNgModel, strictEquals} from './util';\n\nconst INITIAL_VALUE = {\n __UNINITIALIZED__: true\n};\n\nexport class DowngradeComponentAdapter {\n private implementsOnChanges = false;\n private inputChangeCount: number = 0;\n private inputChanges: SimpleChanges = {};\n private componentScope: IScope;\n // TODO(issue/24571): remove '!'.\n private componentRef!: ComponentRef<any>;\n private component: any;\n // TODO(issue/24571): remove '!'.\n private changeDetector!: ChangeDetectorRef;\n // TODO(issue/24571): remove '!'.\n private viewChangeDetector!: ChangeDetectorRef;\n\n constructor(\n private element: IAugmentedJQuery, private attrs: IAttributes, private scope: IScope,\n private ngModel: INgModelController, private parentInjector: Injector,\n private $injector: IInjectorService, private $compile: ICompileService,\n private $parse: IParseService, private componentFactory: ComponentFactory<any>,\n private wrapCallback: <T>(cb: () => T) => () => T) {\n this.componentScope = scope.$new();\n }\n\n compileContents(): Node[][] {\n const compiledProjectableNodes: Node[][] = [];\n const projectableNodes: Node[][] = this.groupProjectableNodes();\n const linkFns = projectableNodes.map(nodes => this.$compile(nodes));\n\n this.element.empty!();\n\n linkFns.forEach(linkFn => {\n linkFn(this.scope, (clone: Node[]) => {\n compiledProjectableNodes.push(clone);\n this.element.append!(clone);\n });\n });\n\n return compiledProjectableNodes;\n }\n\n createComponent(projectableNodes: Node[][]) {\n const providers: StaticProvider[] = [{provide: $SCOPE, useValue: this.componentScope}];\n const childInjector = Injector.create(\n {providers: providers, parent: this.parentInjector, name: 'DowngradeComponentAdapter'});\n\n this.componentRef =\n this.componentFactory.create(childInjector, projectableNodes, this.element[0]);\n this.viewChangeDetector = this.componentRef.injector.get(ChangeDetectorRef);\n this.changeDetector = this.componentRef.changeDetectorRef;\n this.component = this.componentRef.instance;\n\n // testability hook is commonly added during component bootstrap in\n // packages/core/src/application_ref.bootstrap()\n // in downgraded application, component creation will take place here as well as adding the\n // testability hook.\n const testability = this.componentRef.injector.get(Testability, null);\n if (testability) {\n this.componentRef.injector.get(TestabilityRegistry)\n .registerApplication(this.componentRef.location.nativeElement, testability);\n }\n\n hookupNgModel(this.ngModel, this.component);\n }\n\n setupInputs(manuallyAttachView: boolean, propagateDigest = true): void {\n const attrs = this.attrs;\n const inputs = this.componentFactory.inputs || [];\n for (let i = 0; i < inputs.length; i++) {\n const input = new PropertyBinding(inputs[i].propName, inputs[i].templateName);\n let expr: string|null = null;\n\n if (attrs.hasOwnProperty(input.attr)) {\n const observeFn = (prop => {\n let 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 unwatch: Function|null = this.componentScope.$watch(() => {\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 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 // Invoke `ngOnChanges()` and Change Detection (when necessary)\n const detectChanges = () => this.changeDetector.detectChanges();\n const prototype = this.componentFactory.componentType.prototype;\n this.implementsOnChanges = !!(prototype && (<OnChanges>prototype).ngOnChanges);\n\n this.componentScope.$watch(() => this.inputChangeCount, this.wrapCallback(() => {\n // Invoke `ngOnChanges()`\n if (this.implementsOnChanges) {\n const inputChanges = this.inputChanges;\n this.inputChanges = {};\n (<OnChanges>this.component).ngOnChanges(inputChanges!);\n }\n\n this.viewChangeDetector.markForCheck();\n\n // If opted out of propagating digests, invoke change detection when inputs change.\n if (!propagateDigest) {\n detectChanges();\n }\n }));\n\n // If not opted out of propagating digests, invoke change detection on every digest\n if (propagateDigest) {\n this.componentScope.$watch(this.wrapCallback(detectChanges));\n }\n\n // If necessary, attach the view so that it will be dirty-checked.\n // (Allow time for the initial input values to be set and `ngOnChanges()` to be called.)\n if (manuallyAttachView || !propagateDigest) {\n let unwatch: Function|null = this.componentScope.$watch(() => {\n unwatch!();\n unwatch = null;\n\n const appRef = this.parentInjector.get<ApplicationRef>(ApplicationRef);\n appRef.attachView(this.componentRef.hostView);\n });\n }\n }\n\n setupOutputs() {\n const attrs = this.attrs;\n const outputs = this.componentFactory.outputs || [];\n for (let j = 0; j < outputs.length; j++) {\n const output = new PropertyBinding(outputs[j].propName, outputs[j].templateName);\n const bindonAttr = output.bindonAttr.substring(0, output.bindonAttr.length - 6);\n const bracketParenAttr =\n `[(${output.bracketParenAttr.substring(2, output.bracketParenAttr.length - 8)})]`;\n // order below is important - first update bindings then evaluate expressions\n if (attrs.hasOwnProperty(bindonAttr)) {\n this.subscribeToOutput(output, attrs[bindonAttr], true);\n }\n if (attrs.hasOwnProperty(bracketParenAttr)) {\n this.subscribeToOutput(output, attrs[bracketParenAttr], true);\n }\n if (attrs.hasOwnProperty(output.onAttr)) {\n this.subscribeToOutput(output, attrs[output.onAttr]);\n }\n if (attrs.hasOwnProperty(output.parenAttr)) {\n this.subscribeToOutput(output, attrs[output.parenAttr]);\n }\n }\n }\n\n private subscribeToOutput(output: PropertyBinding, expr: string, isAssignment: boolean = false) {\n const getter = this.$parse(expr);\n const setter = getter.assign;\n if (isAssignment && !setter) {\n throw new Error(`Expression '${expr}' is not assignable!`);\n }\n const emitter = this.component[output.prop] as EventEmitter<any>;\n if (emitter) {\n emitter.subscribe({\n next: isAssignment ? (v: any) => setter!(this.scope, v) :\n (v: any) => getter(this.scope, {'$event': v})\n });\n } else {\n throw new Error(`Missing emitter '${output.prop}' on component '${\n getTypeName(this.componentFactory.componentType)}'!`);\n }\n }\n\n registerCleanup() {\n const testabilityRegistry = this.componentRef.injector.get(TestabilityRegistry);\n const destroyComponentRef = this.wrapCallback(() => this.componentRef.destroy());\n let destroyed = false;\n\n this.element.on!('$destroy', () => this.componentScope.$destroy());\n this.componentScope.$on('$destroy', () => {\n if (!destroyed) {\n destroyed = true;\n testabilityRegistry.unregisterApplication(this.componentRef.location.nativeElement);\n destroyComponentRef();\n }\n });\n }\n\n getInjector(): Injector {\n return this.componentRef.injector;\n }\n\n private updateInput(prop: string, prevValue: any, currValue: any) {\n if (this.implementsOnChanges) {\n this.inputChanges[prop] = new SimpleChange(prevValue, currValue, prevValue === currValue);\n }\n\n this.inputChangeCount++;\n this.component[prop] = currValue;\n }\n\n groupProjectableNodes() {\n let ngContentSelectors = this.componentFactory.ngContentSelectors;\n return groupNodesBySelector(ngContentSelectors, this.element.contents!());\n }\n}\n\n/**\n * Group a set of DOM nodes into `ngContent` groups, based on the given content selectors.\n */\nexport function groupNodesBySelector(ngContentSelectors: string[], nodes: Node[]): Node[][] {\n const projectableNodes: Node[][] = [];\n let wildcardNgContentIndex: number;\n\n for (let i = 0, ii = ngContentSelectors.length; i < ii; ++i) {\n projectableNodes[i] = [];\n }\n\n for (let j = 0, jj = nodes.length; j < jj; ++j) {\n const node = nodes[j];\n const ngContentIndex = findMatchingNgContentIndex(node, ngContentSelectors);\n if (ngContentIndex != null) {\n projectableNodes[ngContentIndex].push(node);\n }\n }\n\n return projectableNodes;\n}\n\nfunction findMatchingNgContentIndex(element: any, ngContentSelectors: string[]): number|null {\n const ngContentIndices: number[] = [];\n let wildcardNgContentIndex: number = -1;\n for (let i = 0; i < ngContentSelectors.length; i++) {\n const 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 _matches: (this: any, selector: string) => boolean;\n\nfunction matchesSelector(el: any, selector: string): boolean {\n if (!_matches) {\n const elProto = <any>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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isFunction} from './util';\n\nexport interface Thenable<T> {\n then(callback: (value: T) => any): any;\n}\n\nexport function isThenable<T>(obj: unknown): obj is Thenable<T> {\n return !!obj && isFunction((obj as any).then);\n}\n\n/**\n * Synchronous, promise-like object.\n */\nexport class SyncPromise<T> {\n protected value: T|undefined;\n private resolved = false;\n private callbacks: ((value: T) => unknown)[] = [];\n\n static all<T>(valuesOrPromises: (T|Thenable<T>)[]): SyncPromise<T[]> {\n const aggrPromise = new SyncPromise<T[]>();\n\n let resolvedCount = 0;\n const results: T[] = [];\n const resolve = (idx: number, value: T) => {\n results[idx] = value;\n if (++resolvedCount === valuesOrPromises.length) aggrPromise.resolve(results);\n };\n\n valuesOrPromises.forEach((p, idx) => {\n if (isThenable(p)) {\n p.then(v => resolve(idx, v));\n } else {\n resolve(idx, p);\n }\n });\n\n return aggrPromise;\n }\n\n resolve(value: T): void {\n // Do nothing, if already resolved.\n if (this.resolved) return;\n\n this.value = value;\n this.resolved = true;\n\n // Run the queued callbacks.\n this.callbacks.forEach(callback => callback(value));\n this.callbacks.length = 0;\n }\n\n then(callback: (value: T) => unknown): void {\n if (this.resolved) {\n callback(this.value!);\n } else {\n this.callbacks.push(callback);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactory, ComponentFactoryResolver, Injector, NgZone, Type} from '@angular/core';\n\nimport {IAnnotatedFunction, IAttributes, IAugmentedJQuery, ICompileService, IDirective, IInjectorService, INgModelController, IParseService, IScope} from './angular1';\nimport {$COMPILE, $INJECTOR, $PARSE, INJECTOR_KEY, LAZY_MODULE_REF, REQUIRE_INJECTOR, REQUIRE_NG_MODEL} from './constants';\nimport {DowngradeComponentAdapter} from './downgrade_component_adapter';\nimport {SyncPromise, Thenable} from './promise_util';\nimport {controllerKey, getDowngradedModuleCount, getTypeName, getUpgradeAppType, LazyModuleRef, UpgradeAppType, validateInjectionKey} from './util';\n\n\n/**\n * @description\n *\n * A helper function that allows an Angular component to be used from AngularJS.\n *\n * *Part of the [upgrade/static](api?query=upgrade%2Fstatic)\n * library for hybrid upgrade apps that support AOT compilation*\n *\n * This helper function returns a factory function to be used for registering\n * an AngularJS wrapper directive for \"downgrading\" an Angular component.\n *\n * @usageNotes\n * ### Examples\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/full/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/full/module.ts region=\"ng2-heroes-wrapper\"}\n *\n * For more details and examples on downgrading Angular components to AngularJS components please\n * visit the [Upgrade guide](guide/upgrade#using-angular-components-from-angularjs-code).\n *\n * @param info contains information about the Component that is being downgraded:\n *\n * - `component: Type<any>`: The type of the Component that will be downgraded\n * - `downgradedModule?: string`: The name of the downgraded module (if any) that the component\n * \"belongs to\", as returned by a call to `downgradeModule()`. It is the module, whose\n * corresponding Angular module will be bootstrapped, when the component needs to be instantiated.\n * <br />\n * (This option is only necessary when using `downgradeModule()` to downgrade more than one\n * Angular module.)\n * - `propagateDigest?: boolean`: Whether to perform {@link ChangeDetectorRef#detectChanges\n * change detection} on the component on every\n * [$digest](https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$digest). If set to `false`,\n * change detection will still be performed when any of the component's inputs changes.\n * (Default: true)\n *\n * @returns a factory function that can be used to register the component in an\n * AngularJS module.\n *\n * @publicApi\n */\nexport function downgradeComponent(info: {\n component: Type<any>;\n downgradedModule?: string;\n propagateDigest?: boolean;\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 directiveFactory: IAnnotatedFunction = function(\n $compile: ICompileService, $injector: IInjectorService, $parse: IParseService): IDirective {\n // When using `downgradeModule()`, we need to handle certain things specially. For example:\n // - We always need to attach the component view to the `ApplicationRef` for it to be\n // dirty-checked.\n // - We need to ensure callbacks to Angular APIs (e.g. change detection) are run inside the\n // Angular zone.\n // NOTE: This is not needed, when using `UpgradeModule`, because `$digest()` will be run\n // inside the Angular zone (except if explicitly escaped, in which case we shouldn't\n // force it back in).\n const isNgUpgradeLite = getUpgradeAppType($injector) === UpgradeAppType.Lite;\n const wrapCallback: <T>(cb: () => T) => typeof cb =\n !isNgUpgradeLite ? cb => cb : cb => () => NgZone.isInAngularZone() ? cb() : ngZone.run(cb);\n let ngZone: NgZone;\n\n // When downgrading multiple modules, special handling is needed wrt injectors.\n const hasMultipleDowngradedModules =\n isNgUpgradeLite && (getDowngradedModuleCount($injector) > 1);\n\n return {\n restrict: 'E',\n terminal: true,\n require: [REQUIRE_INJECTOR, REQUIRE_NG_MODEL],\n link: (scope: IScope, element: IAugmentedJQuery, attrs: IAttributes, 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 ngModel: INgModelController = required[1];\n const parentInjector: Injector|Thenable<Injector>|undefined = required[0];\n let moduleInjector: Injector|Thenable<Injector>|undefined = undefined;\n let ranAsync = false;\n\n if (!parentInjector || hasMultipleDowngradedModules) {\n const downgradedModule = info.downgradedModule || '';\n const lazyModuleRefKey = `${LAZY_MODULE_REF}${downgradedModule}`;\n const attemptedAction = `instantiating component '${getTypeName(info.component)}'`;\n\n validateInjectionKey($injector, downgradedModule, lazyModuleRefKey, attemptedAction);\n\n const lazyModuleRef = $injector.get(lazyModuleRefKey) as LazyModuleRef;\n moduleInjector = lazyModuleRef.injector || lazyModuleRef.promise as Promise<Injector>;\n }\n\n // Notes:\n //\n // There are two injectors: `finalModuleInjector` and `finalParentInjector` (they might be\n // the same instance, but that is irrelevant):\n // - `finalModuleInjector` is used to retrieve `ComponentFactoryResolver`, thus it must be\n // on the same tree as the `NgModule` that declares this downgraded component.\n // - `finalParentInjector` is used for all other injection purposes.\n // (Note that Angular knows to only traverse the component-tree part of that injector,\n // when looking for an injectable and then switch to the module injector.)\n //\n // There are basically three cases:\n // - If there is no parent component (thus no `parentInjector`), we bootstrap the downgraded\n // `NgModule` and use its injector as both `finalModuleInjector` and\n // `finalParentInjector`.\n // - If there is a parent component (and thus a `parentInjector`) and we are sure that it\n // belongs to the same `NgModule` as this downgraded component (e.g. because there is only\n // one downgraded module, we use that `parentInjector` as both `finalModuleInjector` and\n // `finalParentInjector`.\n // - If there is a parent component, but it may belong to a different `NgModule`, then we\n // use the `parentInjector` as `finalParentInjector` and this downgraded component's\n // declaring `NgModule`'s injector as `finalModuleInjector`.\n // Note 1: If the `NgModule` is already bootstrapped, we just get its injector (we don't\n // bootstrap again).\n // Note 2: It is possible that (while there are multiple downgraded modules) this\n // downgraded component and its parent component both belong to the same NgModule.\n // In that case, we could have used the `parentInjector` as both\n // `finalModuleInjector` and `finalParentInjector`, but (for simplicity) we are\n // treating this case as if they belong to different `NgModule`s. That doesn't\n // really affect anything, since `parentInjector` has `moduleInjector` as ancestor\n // and trying to resolve `ComponentFactoryResolver` from either one will return\n // the same instance.\n\n // If there is a parent component, use its injector as parent injector.\n // If this is a \"top-level\" Angular component, use the module injector.\n const finalParentInjector = parentInjector || moduleInjector!;\n\n // If this is a \"top-level\" Angular component or the parent component may belong to a\n // different `NgModule`, use the module injector for module-specific dependencies.\n // If there is a parent component that belongs to the same `NgModule`, use its injector.\n const finalModuleInjector = moduleInjector || parentInjector!;\n\n const doDowngrade = (injector: Injector, moduleInjector: Injector) => {\n // Retrieve `ComponentFactoryResolver` from the injector tied to the `NgModule` this\n // component belongs to.\n const componentFactoryResolver: ComponentFactoryResolver =\n moduleInjector.get(ComponentFactoryResolver);\n const componentFactory: ComponentFactory<any> =\n componentFactoryResolver.resolveComponentFactory(info.component)!;\n\n if (!componentFactory) {\n throw new Error(`Expecting ComponentFactory for: ${getTypeName(info.component)}`);\n }\n\n const injectorPromise = new ParentInjectorPromise(element);\n const facade = new DowngradeComponentAdapter(\n element, attrs, scope, ngModel, injector, $injector, $compile, $parse,\n componentFactory, wrapCallback);\n\n const projectableNodes = facade.compileContents();\n facade.createComponent(projectableNodes);\n facade.setupInputs(isNgUpgradeLite, info.propagateDigest);\n facade.setupOutputs();\n facade.registerCleanup();\n\n injectorPromise.resolve(facade.getInjector());\n\n if (ranAsync) {\n // If this is run async, it is possible that it is not run inside a\n // digest and initial input values will not be detected.\n scope.$evalAsync(() => {});\n }\n };\n\n const downgradeFn =\n !isNgUpgradeLite ? doDowngrade : (pInjector: Injector, mInjector: Injector) => {\n if (!ngZone) {\n ngZone = pInjector.get(NgZone);\n }\n\n wrapCallback(() => doDowngrade(pInjector, mInjector))();\n };\n\n // NOTE:\n // Not using `ParentInjectorPromise.all()` (which is inherited from `SyncPromise`), because\n // Closure Compiler (or some related tool) complains:\n // `TypeError: ...$src$downgrade_component_ParentInjectorPromise.all is not a function`\n SyncPromise.all([finalParentInjector, finalModuleInjector])\n .then(([pInjector, mInjector]) => downgradeFn(pInjector, mInjector));\n\n ranAsync = true;\n }\n };\n };\n\n // bracket-notation because of closure - see #14441\n directiveFactory['$inject'] = [$COMPILE, $INJECTOR, $PARSE];\n return directiveFactory;\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 extends SyncPromise<Injector> {\n private injectorKey: string = controllerKey(INJECTOR_KEY);\n\n constructor(private element: IAugmentedJQuery) {\n super();\n\n // Store the promise on the element.\n element.data!(this.injectorKey, this);\n }\n\n resolve(injector: Injector): void {\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 = null!;\n\n // Resolve the promise.\n super.resolve(injector);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {IInjectorService} from './angular1';\nimport {$INJECTOR, INJECTOR_KEY} from './constants';\nimport {getTypeName, isFunction, validateInjectionKey} from './util';\n\n/**\n * @description\n *\n * A helper function to allow an Angular service to be accessible from AngularJS.\n *\n * *Part of the [upgrade/static](api?query=upgrade%2Fstatic)\n * library for hybrid upgrade apps that support AOT compilation*\n *\n * This helper function returns a factory function that provides access to the Angular\n * service identified by the `token` parameter.\n *\n * @usageNotes\n * ### Examples\n *\n * First ensure that the service to be downgraded is provided in an `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/full/module.ts region=\"ng2-heroes-service\"}\n *\n * and that we have included this in our upgrade app `NgModule`\n *\n * {@example upgrade/static/ts/full/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/full/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/full/module.ts region=\"example-app\"}\n *\n * <div class=\"alert is-important\">\n *\n * When using `downgradeModule()`, downgraded injectables will not be available until the Angular\n * module that provides them is instantiated. In order to be safe, you need to ensure that the\n * downgraded injectables are not used anywhere _outside_ the part of the app where it is\n * guaranteed that their module has been instantiated.\n *\n * For example, it is _OK_ to use a downgraded service in an upgraded component that is only used\n * from a downgraded Angular component provided by the same Angular module as the injectable, but\n * it is _not OK_ to use it in an AngularJS component that may be used independently of Angular or\n * use it in a downgraded Angular component from a different module.\n *\n * </div>\n *\n * @param token an `InjectionToken` that identifies a service provided from Angular.\n * @param downgradedModule the name of the downgraded module (if any) that the injectable\n * \"belongs to\", as returned by a call to `downgradeModule()`. It is the module, whose injector will\n * be used for instantiating the injectable.<br />\n * (This option is only necessary when using `downgradeModule()` to downgrade more than one Angular\n * module.)\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 * @publicApi\n */\nexport function downgradeInjectable(token: any, downgradedModule: string = ''): Function {\n const factory = function($injector: IInjectorService) {\n const injectorKey = `${INJECTOR_KEY}${downgradedModule}`;\n const injectableName = isFunction(token) ? getTypeName(token) : String(token);\n const attemptedAction = `instantiating injectable '${injectableName}'`;\n\n validateInjectionKey($injector, downgradedModule, injectorKey, attemptedAction);\n\n const injector: Injector = $injector.get(injectorKey);\n return injector.get(token);\n };\n (factory as any)['$inject'] = [$INJECTOR];\n\n return factory;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementRef, Injector, SimpleChanges} from '@angular/core';\n\nimport {DirectiveRequireProperty, element as angularElement, IAugmentedJQuery, ICloneAttachFunction, ICompileService, IController, IControllerService, IDirective, IHttpBackendService, IInjectorService, ILinkFn, IScope, ITemplateCacheService, SingleOrListOrMap} from './angular1';\nimport {$COMPILE, $CONTROLLER, $HTTP_BACKEND, $INJECTOR, $TEMPLATE_CACHE} from './constants';\nimport {controllerKey, directiveNormalize, isFunction} from './util';\n\n\n\n// Constants\nconst 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}\n\n// Classes\nexport class UpgradeHelper {\n public readonly $injector: IInjectorService;\n public readonly element: Element;\n public readonly $element: IAugmentedJQuery;\n public readonly directive: IDirective;\n\n private readonly $compile: ICompileService;\n private readonly $controller: IControllerService;\n\n constructor(\n private injector: Injector, private name: string, elementRef: ElementRef,\n directive?: 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 = angularElement(this.element);\n\n this.directive = directive || UpgradeHelper.getDirective(this.$injector, name);\n }\n\n static getDirective($injector: IInjectorService, name: string): IDirective {\n const directives: 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 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 static getTemplate(\n $injector: IInjectorService, directive: IDirective, fetchRemoteTemplate = false,\n $element?: IAugmentedJQuery): string|Promise<string> {\n if (directive.template !== undefined) {\n return getOrCall<string>(directive.template, $element);\n } else if (directive.templateUrl) {\n const $templateCache = $injector.get($TEMPLATE_CACHE) as ITemplateCacheService;\n const url = getOrCall<string>(directive.templateUrl, $element);\n const 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 $httpBackend = $injector.get($HTTP_BACKEND) as 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 buildController(controllerType: IController, $scope: 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 locals = {'$scope': $scope, '$element': this.$element};\n const controller = this.$controller(controllerType, locals, null, this.directive.controllerAs);\n\n this.$element.data!(controllerKey(this.directive.name!), controller);\n\n return controller;\n }\n\n compileTemplate(template?: string): ILinkFn {\n if (template === undefined) {\n template =\n UpgradeHelper.getTemplate(this.$injector, this.directive, false, this.$element) as string;\n }\n\n return this.compileHtml(template);\n }\n\n onDestroy($scope: IScope, controllerInstance?: any) {\n if (controllerInstance && isFunction(controllerInstance.$onDestroy)) {\n controllerInstance.$onDestroy();\n }\n $scope.$destroy();\n\n // Clean the jQuery/jqLite data on the component+child elements.\n // Equivelent to how jQuery/jqLite invoke `cleanData` on an Element (this.element)\n // https://github.com/jquery/jquery/blob/e743cbd28553267f955f71ea7248377915613fd9/src/manipulation.js#L223\n // https://github.com/angular/angular.js/blob/26ddc5f830f902a3d22f4b2aab70d86d4d688c82/src/jqLite.js#L306-L312\n // `cleanData` will invoke the AngularJS `$destroy` DOM event\n // https://github.com/angular/angular.js/blob/26ddc5f830f902a3d22f4b2aab70d86d4d688c82/src/Angular.js#L1911-L1924\n angularElement.cleanData([this.element]);\n angularElement.cleanData(this.element.querySelectorAll('*'));\n }\n\n prepareTransclusion(): ILinkFn|undefined {\n const transclude = this.directive.transclude;\n const contentChildNodes = this.extractChildNodes();\n const attachChildrenFn: ILinkFn = (scope, cloneAttachFn) => {\n // Since AngularJS v1.5.8, `cloneAttachFn` will try to destroy the transclusion scope if\n // `$template` is empty. Since the transcluded content comes from Angular, not AngularJS,\n // there will be no transclusion scope here.\n // Provide a dummy `scope.$destroy()` method to prevent `cloneAttachFn` from throwing.\n scope = scope || {$destroy: () => undefined};\n return cloneAttachFn!($template, scope);\n };\n let $template = contentChildNodes;\n\n if (transclude) {\n const slots = Object.create(null);\n\n if (typeof transclude === 'object') {\n $template = [];\n\n const slotMap = Object.create(null);\n const filledSlots = Object.create(null);\n\n // Parse the element selectors.\n Object.keys(transclude).forEach(slotName => {\n let selector = transclude[slotName];\n const 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 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 nodes = slots[slotName];\n slots[slotName] = (scope: IScope, cloneAttach: ICloneAttachFunction) => {\n return cloneAttach!(nodes, scope);\n };\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 resolveAndBindRequiredControllers(controllerInstance: IControllerInstance|null) {\n const directiveRequire = this.getDirectiveRequire();\n const requiredControllers = this.resolveRequire(directiveRequire);\n\n if (controllerInstance && this.directive.bindToController && isMap(directiveRequire)) {\n const requiredControllersMap = 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 private compileHtml(html: string): ILinkFn {\n this.element.innerHTML = html;\n return this.$compile(this.element.childNodes);\n }\n\n private extractChildNodes(): Node[] {\n const childNodes: Node[] = [];\n let 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 private getDirectiveRequire(): DirectiveRequireProperty {\n const require = this.directive.require || (this.directive.controller && this.directive.name)!;\n\n if (isMap(require)) {\n Object.keys(require).forEach(key => {\n const value = require[key];\n const match = value.match(REQUIRE_PREFIX_RE)!;\n const 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 private resolveRequire(require: DirectiveRequireProperty, controllerInstance?: any):\n SingleOrListOrMap<IControllerInstance>|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 value: {[key: string]: IControllerInstance} = {};\n Object.keys(require).forEach(key => value[key] = this.resolveRequire(require[key])!);\n return value;\n } else if (typeof require === 'string') {\n const match = require.match(REQUIRE_PREFIX_RE)!;\n const inheritType = match[1] || match[3];\n\n const name = require.substring(match[0].length);\n const isOptional = !!match[2];\n const searchParents = !!inheritType;\n const startOnParent = inheritType === '^^';\n\n const ctrlKey = controllerKey(name);\n const elem = startOnParent ? this.$element.parent!() : this.$element;\n const value = searchParents ? elem.inheritedData!(ctrlKey) : 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 getOrCall<T>(property: T|Function, ...args: any[]): T {\n return isFunction(property) ? property(...args) : property;\n}\n\n// NOTE: Only works for `typeof T !== 'object'`.\nfunction isMap<T>(value: SingleOrListOrMap<T>): value is {[key: string]: T} {\n return value && !Array.isArray(value) && typeof value === 'object';\n}\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, DoCheck, ElementRef, EventEmitter, Inject, Injector, OnChanges, OnDestroy, OnInit, SimpleChange, SimpleChanges, Type} from '@angular/core';\n\nimport {IAttributes, IDirective, IDirectivePrePost, IInjectorService, ILinkFn, IScope, ITranscludeFunction} from '../../common/src/angular1';\nimport {$SCOPE} from '../../common/src/constants';\nimport {IBindingDestination, IControllerInstance, UpgradeHelper} from '../../common/src/upgrade_helper';\nimport {isFunction, strictEquals} from '../../common/src/util';\n\n\nconst CAMEL_CASE = /([A-Z])/g;\nconst INITIAL_VALUE = {\n __UNINITIALIZED__: true\n};\nconst NOT_SUPPORTED: any = 'NOT_SUPPORTED';\n\n\nexport class UpgradeNg1ComponentAdapterBuilder {\n // TODO(issue/24571): remove '!'.\n type!: Type<any>;\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: IDirective|null = null;\n // TODO(issue/24571): remove '!'.\n template !: string;\n\n constructor(public name: string) {\n const selector =\n name.replace(CAMEL_CASE, (all: string, next: string) => '-' + next.toLowerCase());\n const self = this;\n\n // Note: There is a bug in TS 2.4 that prevents us from\n // inlining this into @Directive\n // TODO(tbosch): find or file a bug against TypeScript for this.\n const directive = {selector: selector, inputs: this.inputsRename, outputs: this.outputsRename};\n\n @Directive({jit: true, ...directive})\n class MyClass extends UpgradeNg1ComponentAdapter implements OnInit, OnChanges, DoCheck,\n OnDestroy {\n constructor(@Inject($SCOPE) scope: IScope, injector: Injector, elementRef: ElementRef) {\n super(\n new UpgradeHelper(injector, name, elementRef, self.directive || undefined), scope,\n self.template, self.inputs, self.outputs, self.propertyOutputs, self.checkProperties,\n self.propertyMap) as any;\n }\n }\n this.type = MyClass;\n }\n\n extractBindings() {\n const btcIsObject = typeof this.directive!.bindToController === 'object';\n if (btcIsObject && Object.keys(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 context = (btcIsObject) ? this.directive!.bindToController : this.directive!.scope;\n\n if (typeof context == 'object') {\n Object.keys(context).forEach(propName => {\n const definition = context[propName];\n const bindingType = definition.charAt(0);\n const bindingOptions = definition.charAt(1);\n const attrName = definition.substring(bindingOptions === '?' ? 2 : 1) || propName;\n\n // QUESTION: What about `=*`? Ignore? Throw? Support?\n\n const inputName = `input_${attrName}`;\n const inputNameRename = `${inputName}: ${attrName}`;\n const outputName = `output_${attrName}`;\n const outputNameRename = `${outputName}: ${attrName}`;\n const 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 json = JSON.stringify(context);\n throw new Error(\n `Unexpected mapping '${bindingType}' in '${json}' in '${this.name}' directive.`);\n }\n });\n }\n }\n\n /**\n * Upgrade ng1 components into Angular.\n */\n static resolve(\n exportedComponents: {[name: string]: UpgradeNg1ComponentAdapterBuilder},\n $injector: IInjectorService): Promise<string[]> {\n const promises = Object.keys(exportedComponents).map(name => {\n const 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\n@Directive()\nclass UpgradeNg1ComponentAdapter implements OnInit, OnChanges, DoCheck {\n private controllerInstance: IControllerInstance|null = null;\n destinationObj: IBindingDestination|null = null;\n checkLastValues: any[] = [];\n directive: IDirective;\n element: Element;\n $element: any = null;\n componentScope: IScope;\n\n constructor(\n private helper: UpgradeHelper, scope: IScope, private template: string,\n private inputs: string[], private outputs: string[], private propOuts: string[],\n private checkProperties: string[], private 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<any>();\n if (this.propOuts.indexOf(outputs[j]) === -1) {\n this.setComponentProperty(\n outputs[j], (emitter => (value: any) => emitter.emit(value))(emitter));\n }\n }\n for (let k = 0; k < propOuts.length; k++) {\n this.checkLastValues.push(INITIAL_VALUE);\n }\n }\n\n ngOnInit() {\n // Collect contents, insert and compile template\n const attachChildNodes: ILinkFn|undefined = this.helper.prepareTransclusion();\n const linkFn = this.helper.compileTemplate(this.template);\n\n // Instantiate controller (if not already done so)\n const controllerType = this.directive.controller;\n const 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 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 link = this.directive.link;\n const preLink = typeof link == 'object' && link.pre;\n const postLink = typeof link == 'object' ? link.post : link;\n const attrs: IAttributes = NOT_SUPPORTED;\n const transcludeFn: ITranscludeFunction = NOT_SUPPORTED;\n if (preLink) {\n preLink(this.componentScope, this.$element, attrs, requiredControllers, transcludeFn);\n }\n\n linkFn(this.componentScope, 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 ngOnChanges(changes: SimpleChanges) {\n const ng1Changes: any = {};\n Object.keys(changes).forEach(name => {\n const change: SimpleChange = changes[name];\n this.setComponentProperty(name, change.currentValue);\n ng1Changes[this.propertyMap[name]] = change;\n });\n\n if (isFunction(this.destinationObj!.$onChanges)) {\n this.destinationObj!.$onChanges!(ng1Changes);\n }\n }\n\n ngDoCheck() {\n const destinationObj = this.destinationObj;\n const lastValues = this.checkLastValues;\n const checkProperties = this.checkProperties;\n const propOuts = this.propOuts;\n checkProperties.forEach((propName, i) => {\n const value = destinationObj![propName];\n const last = lastValues[i];\n if (!strictEquals(last, value)) {\n const eventEmitter: EventEmitter<any> = (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 ngOnDestroy() {\n this.helper.onDestroy(this.componentScope, this.controllerInstance);\n }\n\n setComponentProperty(name: string, value: any) {\n this.destinationObj![this.propertyMap[name]] = value;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, CompilerOptions, Injector, isDevMode, NgModule, NgModuleRef, NgZone, resolveForwardRef, StaticProvider, Testability, Type} from '@angular/core';\nimport {platformBrowserDynamic} from '@angular/platform-browser-dynamic';\n\nimport {bootstrap, element as angularElement, IAngularBootstrapConfig, IAugmentedJQuery, IInjectorService, IModule, IProvideService, IRootScopeService, ITestabilityService, module_ as angularModule} from '../../common/src/angular1';\nimport {$$TESTABILITY, $COMPILE, $INJECTOR, $ROOT_SCOPE, COMPILER_KEY, INJECTOR_KEY, LAZY_MODULE_REF, NG_ZONE_KEY, UPGRADE_APP_TYPE_KEY} from '../../common/src/constants';\nimport {downgradeComponent} from '../../common/src/downgrade_component';\nimport {downgradeInjectable} from '../../common/src/downgrade_injectable';\nimport {controllerKey, Deferred, LazyModuleRef, onError, UpgradeAppType} from '../../common/src/util';\n\nimport {UpgradeNg1ComponentAdapterBuilder} from './upgrade_ng1_adapter';\n\nlet upgradeCount: number = 0;\n\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 * @usageNotes\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}}!](<span ng-transclude></span>)'\n * };\n * });\n *\n *\n * @Component({\n * selector: 'ng2-comp',\n * inputs: ['name'],\n * template: 'ng2[<ng1-hello [title]=\"name\">transclude</ng1-hello>](<ng-content></ng-content>)',\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 = '<ng2-comp name=\"World\">project</ng2-comp>';\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 * @deprecated Deprecated since v5. Use `upgrade/static` instead, which also supports\n * [Ahead-of-Time compilation](guide/aot-compiler).\n * @publicApi\n */\nexport class UpgradeAdapter {\n private idPrefix: string = `NG2_UPGRADE_${upgradeCount++}_`;\n private downgradedComponents: Type<any>[] = [];\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 */\n private ng1ComponentsToBeUpgraded: {[name: string]: UpgradeNg1ComponentAdapterBuilder} = {};\n private upgradedProviders: StaticProvider[] = [];\n // TODO(issue/24571): remove '!'.\n private ngZone!: NgZone;\n // TODO(issue/24571): remove '!'.\n private ng1Module!: IModule;\n private moduleRef: NgModuleRef<any>|null = null;\n // TODO(issue/24571): remove '!'.\n private ng2BootstrapDeferred!: Deferred<IInjectorService>;\n\n constructor(private ng2AppModule: Type<any>, private 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 /**\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 * @usageNotes\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: `<comp name=\"World\">`\n * - Interpolation: `<comp greeting=\"Hello {{name}}!\">`\n * - Expression: `<comp [name]=\"username\">`\n * - Event: `<comp (close)=\"doSomething()\">`\n * - ng-model: `<comp ng-model=\"name\">`\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}}! - <ng-content></ng-content>'\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: <greet salutation=\"Hello\" [name]=\"world\">text</greet>';\n *\n * adapter.bootstrap(document.body, ['myExample']).ready(function() {\n * expect(document.body.textContent).toEqual(\"ng1 template: Hello world! - text\");\n * });\n * ```\n */\n downgradeNg2Component(component: Type<any>): Function {\n this.downgradedComponents.push(component);\n\n return downgradeComponent({component});\n }\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 * @usageNotes\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: `<comp name=\"World\">`\n * - Interpolation: `<comp greeting=\"Hello {{name}}!\">`\n * - Expression: `<comp [name]=\"username\">`\n * - Event: `<comp (close)=\"doSomething()\">`\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}}! - <span ng-transclude></span>'\n * };\n * });\n *\n * module.directive('ng2', adapter.downgradeNg2Component(Ng2Component));\n *\n * @Component({\n * selector: 'ng2',\n * template: 'ng2 template: <greet salutation=\"Hello\" [name]=\"world\">text</greet>'\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 = '<ng2></ng2>';\n *\n * adapter.bootstrap(document.body, ['myExample']).ready(function() {\n * expect(document.body.textContent).toEqual(\"ng2 template: Hello world! - text\");\n * });\n * ```\n */\n upgradeNg1Component(name: string): Type<any> {\n if ((<any>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 /**\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 * @usageNotes\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(\"<my-component></my-component>\")($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 * @returns an `UpgradeAdapterRef`, which lets you register a `ready()` callback to\n * run assertions once the Angular components are ready to test through AngularJS.\n */\n registerForNg1Tests(modules?: string[]): UpgradeAdapterRef {\n const windowNgMock = (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 upgrade = new UpgradeAdapterRef();\n this.ng2BootstrapDeferred.promise.then((ng1Injector) => {\n (<any>upgrade)._bootstrapDone(this.moduleRef, ng1Injector);\n }, onError);\n return upgrade;\n }\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 * @usageNotes\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}}!](<span ng-transclude></span>)'\n * };\n * });\n *\n *\n * @Component({\n * selector: 'ng2',\n * inputs: ['name'],\n * template: 'ng2[<ng1 [title]=\"name\">transclude</ng1>](<ng-content></ng-content>)'\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 = '<ng2 name=\"World\">project</ng2>';\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 bootstrap(element: Element, modules?: any[], config?: IAngularBootstrapConfig):\n UpgradeAdapterRef {\n this.declareNg1Module(modules);\n\n const upgrade = new UpgradeAdapterRef();\n\n // Make sure resumeBootstrap() only exists if the current bootstrap is deferred\n const windowAngular = (window as any /** TODO #???? */)['angular'];\n windowAngular.resumeBootstrap = undefined;\n\n this.ngZone.run(() => {\n bootstrap(element, [this.ng1Module.name], config!);\n });\n const ng1BootstrapPromise = new Promise((resolve) => {\n if (windowAngular.resumeBootstrap) {\n const originalResumeBootstrap: () => void = windowAngular.resumeBootstrap;\n windowAngular.resumeBootstrap = function() {\n windowAngular.resumeBootstrap = originalResumeBootstrap;\n const r = windowAngular.resumeBootstrap.apply(this, arguments);\n resolve();\n return r;\n };\n } else {\n resolve();\n }\n });\n\n Promise.all([this.ng2BootstrapDeferred.promise, ng1BootstrapPromise]).then(([ng1Injector]) => {\n angularElement(element).data!(controllerKey(INJECTOR_KEY), this.moduleRef!.injector);\n this.moduleRef!.injector.get<NgZone>(NgZone).run(() => {\n (<any>upgrade)._bootstrapDone(this.moduleRef, ng1Injector);\n });\n }, onError);\n return upgrade;\n }\n\n /**\n * Allows AngularJS service to be accessible from Angular.\n *\n * @usageNotes\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 */\n upgradeNg1Provider(name: string, options?: {asToken: any}) {\n const token = options && options.asToken || name;\n this.upgradedProviders.push({\n provide: token,\n useFactory: ($injector: IInjectorService) => $injector.get(name),\n deps: [$INJECTOR]\n });\n }\n\n /**\n * Allows Angular service to be accessible from AngularJS.\n *\n * @usageNotes\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 */\n downgradeNg2Provider(token: any): Function {\n return downgradeInjectable(token);\n }\n\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 * @returns The AngularJS upgrade module that is declared by this method\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * const upgradeAdapter = new UpgradeAdapter(MyNg2Module);\n * upgradeAdapter.declareNg1Module(['heroApp']);\n * ```\n */\n private declareNg1Module(modules: string[] = []): IModule {\n const delayApplyExps: Function[] = [];\n let original$applyFn: Function;\n let rootScopePrototype: any;\n let rootScope: IRootScopeService;\n const upgradeAdapter = this;\n const ng1Module = this.ng1Module = angularModule(this.idPrefix, modules);\n const platformRef = platformBrowserDynamic();\n\n this.ngZone = new NgZone({enableLongStackTrace: Zone.hasOwnProperty('longStackTraceZoneSpec')});\n this.ng2BootstrapDeferred = new Deferred();\n ng1Module.constant(UPGRADE_APP_TYPE_KEY, UpgradeAppType.Dynamic)\n .factory(INJECTOR_KEY, () => this.moduleRef!.injector.get(Injector))\n .factory(\n LAZY_MODULE_REF, [INJECTOR_KEY, (injector: Injector) => ({injector} as LazyModuleRef)])\n .constant(NG_ZONE_KEY, this.ngZone)\n .factory(COMPILER_KEY, () => this.moduleRef!.injector.get(Compiler))\n .config([\n '$provide', '$injector',\n (provide: IProvideService, ng1Injector: IInjectorService) => {\n provide.decorator($ROOT_SCOPE, [\n '$delegate',\n function(rootScopeDelegate: 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: ITestabilityService) {\n const originalWhenStable: Function = testabilityDelegate.whenStable;\n // Cannot use arrow function below because we need the context\n const newWhenStable = function(this: unknown, callback: Function) {\n originalWhenStable.call(this, function(this: unknown) {\n const ng2Testability: Testability =\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: IInjectorService, rootScope: IRootScopeService) => {\n UpgradeNg1ComponentAdapterBuilder.resolve(this.ng1ComponentsToBeUpgraded, ng1Injector)\n .then(() => {\n // Note: There is a bug in TS 2.4 that prevents us from\n // inlining this into @NgModule\n // TODO(tbosch): find or file a bug against TypeScript for this.\n const ngModule = {\n providers: [\n {provide: $INJECTOR, useFactory: () => ng1Injector},\n {provide: $COMPILE, useFactory: () => ng1Injector.get($COMPILE)},\n this.upgradedProviders\n ],\n imports: [resolveForwardRef(this.ng2AppModule)],\n entryComponents: this.downgradedComponents\n };\n // At this point we have ng1 injector and we have prepared\n // ng1 components to be upgraded, we now can bootstrap ng2.\n @NgModule({jit: true, ...ngModule})\n class DynamicNgUpgradeModule {\n constructor() {}\n ngDoBootstrap() {}\n }\n platformRef\n .bootstrapModule(\n DynamicNgUpgradeModule, [this.compilerOptions!, {ngZone: this.ngZone}])\n .then((ref: NgModuleRef<any>) => {\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 subscription = this.ngZone.onMicrotaskEmpty.subscribe({\n next: () => {\n if (rootScope.$$phase) {\n if (isDevMode()) {\n console.warn(\n 'A digest was triggered while one was already in progress. This may mean that something is triggering digests outside the Angular zone.');\n }\n\n return rootScope.$evalAsync(() => {});\n }\n\n return rootScope.$digest();\n }\n });\n rootScope.$on('$destroy', () => {\n subscription.unsubscribe();\n });\n });\n })\n .catch((e) => this.ng2BootstrapDeferred.reject(e));\n }\n ]);\n\n return ng1Module;\n }\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 {\n // TODO(issue/24571): remove '!'.\n private injector!: Injector;\n private callbacks: ((injector: Injector) => any)[] = [];\n\n constructor(private element: IAugmentedJQuery) {\n // store the promise on the element\n element.data!(controllerKey(INJECTOR_KEY), this);\n }\n\n then(callback: (injector: Injector) => any) {\n if (this.injector) {\n callback(this.injector);\n } else {\n this.callbacks.push(callback);\n }\n }\n\n resolve(injector: Injector) {\n this.injector = injector;\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 = null!;\n\n // run all the queued callbacks\n this.callbacks.forEach((callback) => callback(injector));\n this.callbacks.length = 0;\n }\n}\n\n\n/**\n * Use `UpgradeAdapterRef` to control a hybrid AngularJS / Angular application.\n *\n * @deprecated Deprecated since v5. Use `upgrade/static` instead, which also supports\n * [Ahead-of-Time compilation](guide/aot-compiler).\n * @publicApi\n */\nexport class UpgradeAdapterRef {\n /* @internal */\n private _readyFn: ((upgradeAdapterRef: UpgradeAdapterRef) => void)|null = null;\n\n public ng1RootScope: IRootScopeService = null!;\n public ng1Injector: IInjectorService = null!;\n public ng2ModuleRef: NgModuleRef<any> = null!;\n public ng2Injector: Injector = null!;\n\n /* @internal */\n private _bootstrapDone(ngModuleRef: NgModuleRef<any>, ng1Injector: 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 /**\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 */\n public ready(fn: (upgradeAdapterRef: UpgradeAdapterRef) => void) {\n this._readyFn = fn;\n }\n\n /**\n * Dispose of running hybrid AngularJS / Angular application.\n */\n public dispose() {\n this.ng1Injector!.get($ROOT_SCOPE).$destroy();\n this.ng2ModuleRef!.destroy();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package. allowing\n * Angular 1 and Angular 2+ to run side by side in the same application.\n */\nexport {VERSION} from './src/common/src/version';\nexport {UpgradeAdapter, UpgradeAdapterRef} from './src/dynamic/src/upgrade_adapter';\n\n// This file only re-exports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Version","Injector","ChangeDetectorRef","Testability","TestabilityRegistry","ApplicationRef","SimpleChange","NgZone","ComponentFactoryResolver","angularElement","INITIAL_VALUE","Directive","Inject","ElementRef","EventEmitter","element","angularModule","platformBrowserDynamic","Compiler","resolveForwardRef","NgModule","isDevMode"],"mappings":";;;;;;;;;;;;IAAA;;;;;;;IAgBA;;;QAGa,OAAO,GAAG,IAAIA,YAAO,CAAC,mBAAmB;;ICnBtD;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;gBAAE,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;oBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/E,O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